#import "ViewController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIButton *btn;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSLog(@"%f %f %f %f",_btn.frame.origin.x,_btn.frame.origin.y,_btn.frame.size.height,_btn.frame.size.width);
_btn.frame = CGRectMake(20, 20, 280, 280);
NSLog(@"%f %f %f %f",_btn.frame.origin.x,_btn.frame.origin.y,_btn.frame.size.height,_btn.frame.size.width);
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
在运行后 输出结果为:
2014-09-21 15:25:34.779 test[2473:80334] 20.000000 20.000000 30.000000 30.000000
2014-09-21 15:25:34.784 test[2473:80334] 20.000000 20.000000 30.000000 30.000000