摘要:
1函数指针声明一个max函数int max(int a,int b);函数的定义int (*p)(int ,int );//函数指针的定义 构成:返回值类型 函数指针的名字 (参数的类型)2回调函数int getValue(int a,int b,int (*p)(int , int));//回调函... 阅读全文
摘要:
#pragma mark - 私有方法#pragma mark 邮箱验证- (BOOL)isValidateEmail:(NSString *)email{ NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,... 阅读全文
摘要:
~~~~~~~~~~~~~~~~~~~~~~背景~~~~~~~~~~~~~~~~~~~~~~// 作为一名 ‘iOS开发工程师’,你应该学会熟练的使用XCode进行代码编写,所以建议大家去使用快捷键进行开发,因为:// 1. 可以让我们显得更加的专业,逼格更高// 2. 提高我们的开发效率,节省开发... 阅读全文
摘要:
效果图:#import "RootViewController.h"@interface RootViewController ()@end@implementation RootViewController- (id)initWithNibName:(NSString *)nibNameOrNil... 阅读全文
摘要:
1.nil >Defines the id of a null instance. 定义一个实例为空, 指向oc中对象的空指针. >示例代码: NSString *someString = nil; NSURL *someURL = nil; id someObject = n... 阅读全文
摘要:
谓词self.searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 100, CGRectGetWidth(self.frame), 40)]; [self addSubview:_searchBar]; // 占位符 [self.s... 阅读全文
摘要:
// UIPageControl的常用方法UIPageControl *onePageControl = [[UIPageControl alloc] init];onePageControl.frame = CGRectMake(10, 100, 300, 30); // 设置位置onePageC... 阅读全文
摘要:
1.效果2.代码 阅读全文
摘要:
// UIStepper的常用方法UIStepper *oneStepper = [[UIStepper alloc] init];oneStepper.frame = CGRectMake(20, 20, 20, 20);oneStepper.backgroundColor = [UIColor ... 阅读全文
摘要:
// UIActivityIndicatorView的常用方法 活动指示器,就是旋转进度轮UIActivityIndicatorView *oneIndicatorView = [[UIActivityIndicatorView alloc] init];oneIndicatorView.activ... 阅读全文