- 博客(7)
- 收藏
- 关注
原创 iOS 由中英文数字组成 正则表达式
NSString *regex = @"^[a-zA-Z0-9\u4e00-\u9fa5]+$"; NSPredicate *pre = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex]; BOOL isMatch = [pre evaluateWithObject:str];
2016-04-27 18:03:10 355
原创 iOS tabbar和navigation组合,点击item两次,会pop到上一个页面,解决不让控制器跳转的方法
问题描述: just found out something: If you have a Tabbar combined with a NavigationController (that has some views on it's stack) and you double click the TabBarItem, the view pops to the first ViewCon
2016-04-18 14:40:27 1469
原创 iOS 在tableView或scrollView上,消退键盘
给tableView或scrollview添加手势 1.UITapGestureRecognizer *gesture = [[UITapGestureRecognize alloc]initWithTarget:self action:@selector(resignKeyBoardGestureWithTableView:)]; 2.gesture.cancelsTouches
2016-04-15 14:12:36 488
原创 iOS解决navigationBar因为图片尺寸问题造成的会向上偏移64的问题
在控制器里viewDidLoad里加入以下代码 self.navigationController.navigationBar.translucent = NO; self.automaticallyAdjustsScrollViewInsets = NO;
2016-04-14 11:28:50 473
原创 隐藏底部的tabbar
在第一个控制器的跳转代码里加入: self.hidesBottomBarWhenPushed = YES; MorePlayRecordsViewController *morePlayRecordsVC = [MorePlayRecordsViewController new]; morePlayRecordsVC.morePlayRecordsTag = [NSStr
2016-04-14 11:19:21 512
原创 pop跳转到指定的控制器
for (UIViewController *temp in self.navigationController.viewControllers) { if ([temp isKindOfClass:[MyLoginViewController class]]) { [self.navigationC
2016-04-08 11:19:27 1887
原创 tabBar控制器,跳转到指定的页面
self.tabBarController.selectedIndex = i;(其中i为想要跳转的页面的下标,从0开始)
2016-04-01 11:55:23 958
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人