Translate

2012年6月29日 星期五

RegexKitLite 編譯錯誤

解決辦法為
In project setting search "other" at Other Linker Flage put the word "-licucore".

2012年6月24日 星期日

icon dimensions (0 x 0) don't meet the size requirements

今天要上傳app store發生
icon dimensions (0 x 0) don't meet the size requirements
於是上網查

解決方法為
Edit Project Setting -> Build ->uncheck Compress PNG Files.


2012年6月15日 星期五

NSArray to NSString

从字符串分割到数组- componentsSeparatedByString: NSString *string = [[NSString alloc] initWithString:@"One,Two,Three,Four"]; NSLog(@"string:%@",string);
 NSArray *array = [string componentsSeparatedByString:@","];
 NSLog(@"array:%@",array); [string release]; 結果呈現 2012-06-15 17:10:34.028 Hotairballoon[546:707] string:One,Two,Three,Four 2012-06-15 17:10:34.029 Hotairballoon[546:707] array:( One, Two, Three, Four ) 从数组合并元素到字符串- componentsJoinedByString: NSArray *array = [[NSArray alloc] initWithObjects:@"One",@"Two",@"Three",@"Four",nil]; NSString *string = [array componentsJoinedByString:@","];
 NSLog(@"string:%@",string); 結果呈現 2012-06-15 17:16:57.596 Hotairballoon[565:707] string:One,Two,Three,Four

2012年6月13日 星期三

ASIHTTPRequest

ASIHTTPRequest
雖然作者已經沒在更新了但是我還是覺得不錯用
使用前記得要

#pragma mark -
#pragma mark ASIHTTPRequest delegate
- (void)requestFinished:(ASIHTTPRequest *)request
{
    NSString *responseString = [request responseString];
}

- (void)requestFailed:(ASIHTTPRequest *)request
{

}


get直接給參數
例如

NSString *ip_url = [NSString stringWithFormat:@"%@%@", get_invitation_reward, AppDelegate.act_id]; NSURL *url = [NSURL URLWithString:ip_url]; request_list = [ASIHTTPRequest requestWithURL:url]; [request_list setDelegate:self]; [request_list startAsynchronous];



post逐一給參數
例如

NSURL *url = [NSURL URLWithString:set_reward_winner]; request_reward_winner = [ASIFormDataRequest requestWithURL:url]; [request_reward_winner setRequestMethod:@"POST"]; [request_reward_winner setPostValue:AppDelegate.act_id forKey:@"act_id"]; [request_reward_winner setPostValue:[[list_data objectAtIndex:select_row] objectForKey:@"code"] forKey:@"code"]; [request_reward_winner setPostValue:[prize_reward_id objectAtIndex:selectCom1Index] forKey:@"reward_id"]; [request_reward_winner setDelegate:self]; [request_reward_winner startAsynchronous];

2012年6月10日 星期日

iPhone/iPod Touch: Icon.png: icon dimensions (0 x 0) don't meet the size requirements

iPhone/iPod Touch:Icon.png:icon dimensions (0 x 0)don't meet the size requirements


解決辦法為在PROJECT專案上
選擇Build Settings->Packaging->Compress PNG Files->value : NO





2012年6月3日 星期日

UIImageView Animation Stop

轉自老外的好東西
實現UIImageView動畫結束通知

UIImageViewAnimatorSample