如何炫酷的完成view的初始化?
- (UIView *)view
{
if (!_view) {
_view = ({
UIView * view = [[UIView alloc]init];
view.frame = (CGRect) {
.size = {
.width = 100,
.height = 100,
},
.origin = {
.x = 100,
.y = 100,
}
};
//或者:view2.frame = (CGRect){100, 100, 100, 100};
view;
});
}
return _view;
}