UIImage* closeImage = [UIImage imageNamed:@"FBDialog.bundle/images/close.png"];
UIColor* color = [UIColor colorWithRed:167.0/255 green:184.0/255 blue:216.0/255 alpha:1];
_closeButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
[_closeButton setImage:closeImage forState:UIControlStateNormal];
[_closeButton setTitleColor:color forState:UIControlStateNormal];
[_closeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighte
[_closeButton addTarget:self action:@selector(cancel)
forControlEvents:UIControlEventTouchUpIns
// To be compatible with OS 2.x
#if __IPHONE_OS_VERSION_MAX_ALLOWED <= __IPHONE_2_2
_closeButton.font = [UIFont boldSystemFontOfSize:12];
#else
_closeButton.titleLabel.font = [UIFont boldSystemFontOfSize:12];
#endif
_closeButton.showsTouchWhenHighlighte
_closeButton.autoresizingMask = UIViewAutoresizingFlexib
| UIViewAutoresizingFlexib
[self addSubview:_closeButton];
FaceBook 代码中重要备份&nbs…
最新推荐文章于 2019-06-25 15:32:33 发布