会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
tongyuling
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
下一页
2016年1月20日
iOS textField禁止输入指定字
摘要: iOS textField禁止输入指定字母(如:禁止输入a、b、A、B)1、定义宏#define NUMBERS @"aAbB"2、textfield—delegate- (BOOL)textField:(UITextField*)textField shouldChangeCharactersIn...
阅读全文
posted @ 2016-01-20 10:34 tongyuling
阅读(871)
评论(0)
推荐(0)
2016年1月8日
iOS 使cell的分割线显示完全
摘要: 问题:分割线没有显示全,左边有一段缺失解决:-(void)viewDidLayoutSubviews { if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) { [self.tableView setS...
阅读全文
posted @ 2016-01-08 15:54 tongyuling
阅读(668)
评论(0)
推荐(0)
2015年11月26日
iOS 让textField光标移动位置
摘要: 让textField光标让右移动10个像素位置:UIView * view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 40)];self.textField.leftView = view;self.textField.leftView...
阅读全文
posted @ 2015-11-26 16:15 tongyuling
阅读(1583)
评论(0)
推荐(0)
2015年11月23日
iOS scrollView和tableView的冲突问题
摘要: tableView继承自scrollView,所以tableView和scrollView在同一界面中都会走delegate方法。那么有时滑动tableView,scrollView会响应怎么解决?其实很简单:在delegate里面判断self.scrollview==scrollView或self...
阅读全文
posted @ 2015-11-23 16:18 tongyuling
阅读(1889)
评论(0)
推荐(0)
2015年11月18日
iOS 断言的运用
摘要: NSAssert的使用苹果在foundation.framework中定义了这么一个宏:#define NSAssert(condition, desc, ...)第一个参数为一个条件判断,如果为假,则抛出异常,显示第二个参数所描述的信息。例如NSAssert(1>=2, @"1>=2 is fal...
阅读全文
posted @ 2015-11-18 10:24 tongyuling
阅读(343)
评论(0)
推荐(0)
2015年10月30日
iOS 设置LaunchImage动画
摘要: LaunchImage在APP初始化完之后会立即消失并显示APP的界面,但是有的时候我们不希望它这么快就消失(比如有的人希望有个过渡效果 有的人希望等某些设置或者数据加载完之后再消失),这也很简单,我们只要自己把LaunchImage再显示出来并且置顶就OK了。不过我们配置了那么多适用于不同屏幕分辨...
阅读全文
posted @ 2015-10-30 15:14 tongyuling
阅读(1597)
评论(0)
推荐(0)
2015年10月28日
iOS 3DTouch
摘要: 实现Quick Actions有两种办法: 静态、动态静态:动态:
阅读全文
posted @ 2015-10-28 15:34 tongyuling
阅读(154)
评论(0)
推荐(0)
2015年10月27日
iOS 表情替换成字符串
摘要: //系统表情替换+ (NSString *)stringReplaceWithFace:(NSString *)str{ NSString *mutaStr = str; for (int i=0x1F600; i 0x1F644) { int sym = EMOJI_CODE_TO...
阅读全文
posted @ 2015-10-27 17:31 tongyuling
阅读(1770)
评论(0)
推荐(0)
2015年10月26日
iOS 设置UILabel 的内边距
摘要: iOS 设置UILabel 的内边距- (void)drawTextInRect:(CGRect)rect { UIEdgeInsets insets = {0, 5, 0, 5}; [super drawTextInRect:UIEdgeInsetsInsetRect(rect, in...
阅读全文
posted @ 2015-10-26 17:23 tongyuling
阅读(5173)
评论(0)
推荐(1)
2015年10月16日
iOS collection长按编辑功能
摘要: //长按是否出现编辑菜单(Cut Copy Paste)- (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath{ retu...
阅读全文
posted @ 2015-10-16 16:07 tongyuling
阅读(668)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
下一页
公告