摘要:
// 实例化一个ScrollView UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; scrollView.backgroundColor = [UICol 阅读全文
摘要:
一、UITabBarController主要用来管理你提供的content view controllers,而每一个 content view controller则负责管理自己的view层级关系,通常,当你的程序想要提供一些平行(同一个等级的)的不同界面,而恰好这些界面使用到的数据是一类的,或者 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.bounds]; webView.delegate = self; //设置代理 [s 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; UIButton *alertBtn = [UIButton buttonWithType:UIButtonTypeSystem]; alertBtn.frame = CGRectMake(40, 100, 295 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; UISwitch *swc = [[UISwitch alloc] initWithFrame:CGRectMake(40, 100, 295, 30)]; [swc addTarget:self action:@ 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem]; btn.frame = CGRectMake(40, 100, 295, 30); [bt 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; // 创建一个UIActivityIndicatorView,大小是固定的 UIActivityIndicatorView *aiv = [[UIActivityIndicatorView alloc] initW 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; // 实例化UISwitch,固定大小 UISwitch *swc = [[UISwitch alloc] initWithFrame:CGRectMake(40, 100, 295, 30)]; // 主题颜色 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; // 实例化 UIProgressView,高度是固定的 UIProgressView *progressView = [[UIProgressView alloc] initWithFrame:CGRectMak 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; // 实例化UIStepper,大小是固定的 UIStepper *stepper = [[UIStepper alloc] initWithFrame:CGRectMake(40, 100, 295, 200)] 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; NSArray *items = @[@"消息", @"电话"]; UISegmentedControl *segment = [[UISegmentedControl alloc] initWithItems:i 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; // 实例化UISlider,高度对外观没有影响 UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(40, 100, 295, 30)]; // 设置Slider的最大值和最小值 ... 阅读全文