- 博客(7)
- 收藏
- 关注
转载 Objective-C中的实例方法、类方法、Category、Protocol
1.方法 Objective-C中的方法有两种: 1.1 实例方法 以-开头的方法是实例方法。它属于类的某一个或某几个实例对象,即类对象必须实例化后才可以使用的方法,将消息发送给实例对象: // Deck.h #import #import "Card.h" @interface Deck : NSObject @property(nonatomic) int cardNum;
2017-05-05 20:08:32 199
原创 ios8.0后 UIAlertController的使用
//设置时间选择器 UIDatePicker *datePicker = [UIDatePicker new]; datePicker.datePickerMode = UIDatePickerModeDate; UIAlertController *alertController = [UIAlertController alertContr
2015-04-15 10:50:17 443
转载 点击头像放大
#pragma mark - 放大头像 - (IBAction)showBigPortrait:(id)sender { //创建灰色透明背景,使其背后内容不可操作 bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen
2015-02-13 14:45:15 492 1
原创 md5加密
#import #pragma mark - MD5 (32位小写) -(NSString *)md5HexDigest:(NSString *)input { const char *str = [input UTF8String]; unsigned char result[CC_MD5_DIGEST_LENGTH]; CC_MD5(str,strle
2015-02-13 14:35:36 357
原创 ScrollView and pageControl
.h文件: @property(strong,nonatomic) UIPageControl *pageControl; @property(strong,nonatomic) UIScrollView *scrollView; @property(strong,nonatomic) UIView *pView; .m文件:
2014-06-15 22:48:18 647
原创 webViewDemo
.h 文件: #import @interface RootViewController : UIViewControllerUIWebViewDelegate> @property (strong,nonatomic)UIWebView *webView; @property (strong,nonatomic)UIActivityIndica
2014-06-15 22:33:46 351
原创 IOS TextView 自适应高度
UITextView *textView = [[UITextView alloc] init]; UIFont *font = [UIFont systemFontOfSize:16]; textView.backgroundColor = [UIColor whiteColor]; textView.textColor = [UIColo
2014-06-12 16:44:45 597
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人