iOS基础
csdn_success
这个作者很懒,什么都没留下…
展开
-
刷新section和cell
UITableView section的刷新原创 2015-12-15 15:44:35 · 350 阅读 · 0 评论 -
设置键盘只能输入数字和字母--密码键盘
1、遵守协议 UITextFieldDelegate 2、textFiled.keyboardType = UIKeyboardTypeASCIICapable; textFiled.delegate = self; 3、定义宏 #define numAndLetter @”ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz原创 2015-12-15 16:13:47 · 928 阅读 · 0 评论 -
iOS监听键盘弹出
// 注册通知 监听键盘弹出 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyBoard:) name:UIKeyboardWillShowNotification object:nil];– (void)keyBoard:(NSNotification *)notiti{ //原创 2016-01-08 10:14:43 · 383 阅读 · 0 评论 -
纯代码创建UIDatePicker
import “ViewController.h”#define ScreenWidth [UIScreen mainScreen].bounds.size.width #define ScreenHeight [UIScreen mainScreen].bounds.size.height @interface ViewController () { UIDatePicker *原创 2016-01-08 10:24:15 · 501 阅读 · 0 评论 -
为view添加阴影效果
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 300, 100, 100)];view.backgroundColor = [UIColor greenColor];[self.view addSubview:view];view.layer.shadowColor = [[UIColor blackColor] CG原创 2016-02-19 17:40:37 · 381 阅读 · 0 评论 -
UIButtun的一些设置方法
将buttun切圆角 btn.layer.cornerRadius = 5; btn.layer.masksToBounds = YES;取消buttun点击闪一下的效果 UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.adjustsImageWhenHighlighted = NO; 设置buttun的字体原创 2015-12-15 16:00:29 · 919 阅读 · 0 评论 -
navigationController技巧
自定义navigationItem的leftBarButtonItem后滑动返回手势失效解决办法重新设置手势的delegateself.navigationController.interactivePopGestureRecognizer.delegate = (id)self;原创 2016-05-07 17:26:31 · 317 阅读 · 0 评论 -
常被忽略的小技巧
允许应用程序获取框架库内语言 info.plist 中添加Localized resources can be mixed 设置为YEScell的底线高度 1 / [UIScreen mainScreen].scale原创 2016-02-19 17:21:46 · 383 阅读 · 0 评论