手机号码验证- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //会输出1或者0.1为YES,0为NO NSLog(@"------...
分类:
移动开发 时间:
2014-07-07 16:31:10
阅读次数:
226
一个软件在用户注册的时候,往往是需要验证码的。也就是要先把验证码发在手机上,然后,用户在软件中输入,若验证码正确,注册用户才可登陆。- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loa...
分类:
移动开发 时间:
2014-07-07 13:18:28
阅读次数:
258
接触到了向左右滑动的手势,上代码。以下实现了,向左滑动时,提出向左滑动的提示,当向右滑动时,提出向右滑动的提示。- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the v...
分类:
其他好文 时间:
2014-07-07 08:25:17
阅读次数:
245
1在Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO2 在需要改变状态栏颜色的ViewController中在ViewDidLoad方法中增加:[UIApplication sharedApplication] setStatusBa...
分类:
移动开发 时间:
2014-07-05 19:48:18
阅读次数:
259
使用原生态的api上传文件的实现:
#import "MainViewController.h"
@interface MainViewController ()
@property (weak, nonatomic) UIImageView *imageView;
@end
@implementation MainViewController
- (void)viewDidLoad
{...
分类:
移动开发 时间:
2014-07-03 17:11:43
阅读次数:
279
@interface FirstViewController ()
@property (nonatomic,assign)BOOL isplay;
@end
@implementation FirstViewController
@synthesize isplay;
- (void)viewDidLoad
{
[super
viewDid...
分类:
其他好文 时间:
2014-07-02 10:47:22
阅读次数:
191
@interface RootViewController (){ UIView *view1; UIView *view2; int flag;}@end@implementation RootViewController- (void)viewDidLoad{ [s...
分类:
其他好文 时间:
2014-07-02 10:25:29
阅读次数:
130
1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 // Do any additional setup after loading the view. 5 6 //1:使用第三方库 7 NSData *d...
分类:
移动开发 时间:
2014-07-01 16:40:39
阅读次数:
297
1.发通知。(以这条通知为例,通知名字:gameOverNotification。通知参数:title)
NSNotificationCenter.defaultCenter().postNotificationName("gameOverNotification", object: title)
2.在要监听这则通知的viewDidload方法里面添加观察者,以便监听这则通知
...
分类:
其他好文 时间:
2014-07-01 14:28:52
阅读次数:
230
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
self.mapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
self.mapView.mapType =...
分类:
其他好文 时间:
2014-07-01 06:17:34
阅读次数:
758