posted @ 2012-02-06 09:04
文章分类 - UITableView
摘要:原文地址:http://www.raywenderlich.com/5191/beginning-storyboards-in-ios-5-part-2In this second and final part of the tutorial series, we’ll cover segues, static table view cells, the add player screen, and a game picker screen!Introducing SeguesIt’s time to add more view controllers to our storyboard. W
阅读全文
摘要:原文地址:http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1Getting StartedFire up Xcode and create a new project. We’ll use the Single View Application template as our starting point and then build up the app from there.Fill in the template options as follows:Product Name: RatingsCo
阅读全文
posted @ 2012-02-06 09:02
摘要:为了美化UI,想实现如下图的效果:点击高亮出发点是好的。没想到,出现了下图的连带问题:选择一行的时候,竟然连带的出现了高亮效果这个如何是好?经过网络搜索,发现我不是第一个遇到这样的问题:custom-accessory-button-highlight-triggered-by-didselectrowatindexpath1 UIButton *accessoryButton = [UIButton buttonWithType:UIButtonTypeCustom]; 2 accessoryButton.frame = CGRectMake(0, 0, 32, 32); 3 ...
阅读全文
posted @ 2012-02-05 18:58
摘要:本来tableview多选删除是天经地义的事儿。在tabbar中想使用tableview的多选删除也没啥不对。纠结就纠结在想在tabbar中使用tableview多选删除的时候要实现类似系统自带的mail多选删除的效果。好吧,既然产品是这么设计的,合理不合理是一回事儿,能不能实现却是我的事儿,抱着“只要能实现,我就能实现的信念”,纠结了七八个小时,终于把这个不起眼的小效果搞定了。开始界面点了编辑以后。选择要删除的行点删除以后的效果点清空以后的效果点确定以后的效果核心代码除了实现tabbar多选删除效果的以外,增加一个隐藏tabbar,一个在toolbar添加两个删除按钮及相关的处理方法。 1
阅读全文
posted @ 2012-02-05 18:50
摘要:先前的准备工作:第一步,准备好数据源.#import<UIKit/UIKit.h>@interfaceUITableCellSwapDeleteViewController:UIViewController<UITableViewDelegate>{IBOutletUITableView*testTableView;NSMutableArray*dataArray;}@property(nonatomic,retain)UITableView*testTableView;@property(nonatomic,retain)NSMutableArray*dataArra
阅读全文
posted @ 2012-02-05 18:34
摘要:第一步,实现-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete | UITab...
阅读全文
posted @ 2012-02-05 18:28

浙公网安备 33010602011771号