-
Notifications
You must be signed in to change notification settings - Fork 0
/
ViewController.m
41 lines (33 loc) · 1.1 KB
/
ViewController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// ViewController.m
// AddAttribute
//
// Created by 陈楠 on 17/8/15.
// Copyright © 2017年 email:ch_email@126.com. All rights reserved.
//
#import "ViewController.h"
#import "AddAttributeVC.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.view.backgroundColor = [UIColor whiteColor];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(40, 100, 100, 100);
[btn setTitle:@"添加属性" forState:0];
btn.backgroundColor = [UIColor orangeColor];
[btn addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
btn.center = self.view.center;
}
- (void)btnAction:(UIButton *)sender{
AddAttributeVC *vc = [[AddAttributeVC alloc]init];
[self.navigationController pushViewController:vc animated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end