搜尋此網誌

顯示具有 xcode 標籤的文章。 顯示所有文章
顯示具有 xcode 標籤的文章。 顯示所有文章

2012年8月22日 星期三

xcode 自動排版


Xcode  版本:4.2和4.2之前的版本
             选中需要格式化代码 -> Edit -> Format ->Re-Indent
Xcode 版本:4.2之后的版本
             选中需要格式化代码 -> Editor -> Structure ->Re-Indent       或者
             选中需要格式化代码 -> 右击 ->选中 Structure ->Re-Indent

2012年8月6日 星期一

(IOS)Tapku Library


Tapku 是一個開源的程式庫,包含10種有用的 API,而且在使用上也十分容易。
1.Coverflow
就是做出類似 iPhone Music 顯示唱片 Cover 的效果。
2.Month Grid Calendar

2012年6月18日 星期一

(IOS)tableView如何動態加載資料

//功能在tableView最下面加上new按下去會加載資料 
.h
@property(nonatomic, retain)
 NSMutableArray *ta1;
 ------------------------------------------------- .
m
- (void)viewDidLoad {
 ta1 =[[NSMutableArray alloc] initWithObjects:@"aaa",@"bbb",@"new", nil];
 [super viewDidLoad];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
 // VideoController *vc=[[VideoController alloc] initWithNibName:@"VideoController" bundle:nil];
 // [vc setTitle:[ta1 objectAtIndex:indexPath.row]];
 // [self.navigationController pushViewController:vc animated:YES];

 if ([[ta1 objectAtIndex:indexPath.row] isEqual:@"new"]) {
 [ta1 removeObject:@"new"];
 [ta1 addObject:@"pp1"];
 [ta1 addObject:@"pp2"];
 [ta1 addObject:@"pp3"];
 [ta1 addObject:@"new"];
 [self.tView reloadData]; }
 }