枚举3

来源:互联网 发布:美国缩表中国楼市知乎 编辑:程序博客网 时间:2024/06/05 14:51
//枚举类型NS_ENUM()typedef NS_ENUM(NSInteger, LeftMenuTopItemType) {    LeftMenuTopItemMain,    LeftMenuTopItemShows,    LeftMenuTopItemSchedule};
for (i=1; i++; i<=7)
for (i=1; i++; i<=NUM_DAYS_IN_WEEK)
@property (weak, nonatomic) IBOutlet UIButton *myBtn;@property (copy, nonatomic) NSString *name;
switch (condition) {    case 1:        // ** fall-through! **    case 2:        // code executed for values 1 and 2        break;    default:        //代码        break;}
CGRect frame   = self.view.frame;CGFloat x    = CGRectGetMinX(frame);CGFloat y    = CGRectGetMinY(frame);CGFloat width  = CGRectGetWidth(frame);CGFloat height = CGRectGetHeight(frame);CGRect frame   = CGRectMake(0.0, 0.0, width, height);
@interface AirPlane+ (instancetype)airPlaneWithType:(AirPlaneType)type;@end
- (instancetype)init{    self = [super init];    if (self) {        //代码    }    return self;}
0 0
原创粉丝点击