随笔分类 -  IOS-UI

关于tableview的多选问题
摘要:声明下,虽然说的是原创,但是所有的方法都是谷歌搜到的,我只是整理者;目前我发现有两种方法,第一种方法:- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NS... 阅读全文

posted @ 2014-09-02 11:26 超级庄子 阅读(987) 评论(0) 推荐(0)

设置navigation完全透明效果(How to make navigation bar transparent in iOS 7)
摘要:原文地址:http://stackoverflow.com/questions/20319439/how-to-make-navigation-bar-transparent-in-ios-7[self.navigationBar setBackgroundImage:[UIImage new] f... 阅读全文

posted @ 2014-08-01 17:17 超级庄子 阅读(302) 评论(0) 推荐(0)

TableView索引的添加
摘要:首先是在这个代理函数中添加索引数组:#pragma mark-索引显示数组- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{ NSMutableArray *array = [NSMutableArray ... 阅读全文

posted @ 2014-07-24 10:14 超级庄子 阅读(400) 评论(0) 推荐(0)

邮箱格式判断(忘了从哪来看到的)
摘要:-(BOOL)isValidateEmail:(NSString *)email{ NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; NSPredicate *email... 阅读全文

posted @ 2014-07-08 14:30 超级庄子 阅读(145) 评论(0) 推荐(0)

UISearchBar 按钮的文字和颜色更改
摘要:设置 取消 按钮的颜色 为 黑色(这个方法是google来的)[[UIBarButtonItem appearanceWhenContainedIn: [UISearchBar class], nil] setTintColor:[UIColor blackColor]];至于更改cancel按钮为... 阅读全文

posted @ 2014-07-05 13:17 超级庄子 阅读(407) 评论(0) 推荐(0)

IOS 函数在下方提示 函数说明
摘要:函数声明时候:/*!测试*/- (void)test;调用时候出现如下效果:小功能而已,希望对别人有帮助! 阅读全文

posted @ 2014-07-04 16:47 超级庄子 阅读(140) 评论(0) 推荐(0)

UIScrollView pagingEnabled下,判断左移还是右移!
摘要://将要开始拖拽,手指已经放在view上并准备拖动的那一刻- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{ //拖动前的起始坐标 startContentOffsetX = scrollView.content... 阅读全文

posted @ 2014-07-03 09:54 超级庄子 阅读(358) 评论(0) 推荐(0)

UICollectionView 为每个section 添加headerview
摘要:这个问题我纠结了好长时间,网上关于UICollection的事例很少,这个也是我google找了许久找到的方法(原谅我的愚蠢),留下权作备份,如果对你有帮助的话,更好!如果有错得地方,还请多指教!我也是刚学习UICollection! //注册headercell [self.Photo... 阅读全文

posted @ 2014-07-01 20:30 超级庄子 阅读(937) 评论(0) 推荐(0)

UIDatePicker使用方法 转载
摘要:// 初始化UIDatePickerUIDatePicker *datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 200, 320, 216)];// 设置时区[datePicker setTimeZone:[NSTimeZ... 阅读全文

posted @ 2014-06-26 17:43 超级庄子 阅读(141) 评论(0) 推荐(0)

聊天泡泡需要切割图片
摘要:UIImage *newImage=[oldimage stretchableImageWithLeftCapWidth:30 topCapHeight:20];在图片高20的地方复制填充在图片宽30的地方复制填充 阅读全文

posted @ 2014-05-23 16:41 超级庄子 阅读(79) 评论(0) 推荐(0)

UI小组件学习
摘要:UIActivityIndicatorView /* UIActivityIndicatorViewStyleWhiteLarge, UIActivityIndicatorViewStyleWhite, UIActivityIndicatorViewStyleGray,... 阅读全文

posted @ 2014-05-23 16:20 超级庄子 阅读(152) 评论(0) 推荐(0)

UINavigationController使用
摘要:FirstViewController *firstVC=[[FirstViewController alloc]initWithNibName:@"FirstViewController" bundle:Nil]; //实例化导航控制器 UINavigationControll... 阅读全文

posted @ 2014-05-23 15:57 超级庄子 阅读(137) 评论(0) 推荐(0)

NSNotificationCenter+ UITapGestureRecognizer
摘要:这里涉及比较多,包括手势,通知中心等,具体上代码#import "RegistViewController.h"#import "DetailViewController.h"@interface RegistViewController ()- (IBAction)goDetail:(id)sen... 阅读全文

posted @ 2014-05-23 15:44 超级庄子 阅读(218) 评论(0) 推荐(0)

UIView动画---移动与变形
摘要:-(void)startAnim:(id)sender{ [UIView animateWithDuration:1 animations:^{ redView.frame=CGRectMake(100, 300, 150, 150);//大小位置 redView.... 阅读全文

posted @ 2014-05-23 15:32 超级庄子 阅读(580) 评论(0) 推荐(0)

UIImageView 动画
摘要:UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(10, 100, 300, 160)]; imageView.backgroundColor=[UIColor blueColor]; UIIm... 阅读全文

posted @ 2014-05-23 15:27 超级庄子 阅读(119) 评论(0) 推荐(0)

导航