原创 ios6上,tabbar不顯示

繼承系統UITabbarController,爲根控制器,在ios7上tabbar正常顯示,而在ios6上tabbar不顯示,tabbar的hidd

原创 nssting 編碼問題

%3Cimg%20alt%3D%22%u5FAE%u7B11%22%20src%3D%22/anjiaoban/Themes/Scripts/xhEditor/xheditor_emot/default/smile.gif%22%20/

原创 uidatepicker顯示中文

第一步,設置模擬器爲語言設置爲中文; 第二步,區域格式設置爲中國

原创 刪除cell 報錯*** Assertion failure in -[UITableView _endCellAnimationsWithContext:]

先remove數據,再執行  [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAni

原创 _locService = [[BMKLocationService alloc]init]; 我把這句話放在viewdidload 裏,整個app不啓動了,一直停留在啓動頁面

_locService = [[BMKLocationService alloc]init]; 我把這句話放在viewdidload 裏,整個app

原创 ios 百度地圖開發 奔潰原因可能之一

在做公交搜索時,共兩頁,前一頁是選擇地點的,其中我想默認定位點爲起點,所以在此頁面開啓了mapview的定位,跳轉到下一頁面(此頁面也開啓了定位)時

原创 iOS 圖片base64編碼 上傳

一直上傳不成功,搜了N遍,嘗試了N遍,終於找到了一個相關的,如下: 你可以看一下你傳到後臺後的數據,看看是不是收到的數據跟你上傳的數據不一樣。base64編碼之後,data裏面會含有一些“+”,而“+”通過post傳到後臺後,會被轉換成

原创 hidesBottomBarWhenPushed 使用

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableView deselectRowA

原创 uitableview中的cellforrow方法裏 修改button title

//判斷登陸退出按鈕 self.loginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [self.loginBtn setFrame:cell.f

原创 url utf-8編碼解碼

1.url編碼 ios中http請求遇到漢字的時候,需要轉化成UTF-8,用到的方法是: NSString * encodingString = [urlString stringByAddingPercentEscapesUsin

原创 uisearchbar 背景

想要searchbar的背景同table保持一致,又要取消按鈕的字體可調,如下設置 for (UIView *view in [[_searchBar.subviews objectAtIndex:0] subviews]){ //去除

原创 ld: 16 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1

意爲疏忽導致的,我就上圖說說我的原因之一吧: wo de 原因就是頭文件包含了.m 點贊 收藏 分享 文章舉報 海原浪子 發佈了52 篇原創文章 · 獲贊 10 · 訪問量

原创 UIActionSheet在有Tabbar的情況下取消按鈕觸摸被遮

UIActionSheet最後一個按鈕沒響應,一般是cancelButton,要稍微向上偏移一點纔可以。 不過這不是常態,幾乎沒多少人碰到這個問題,這是在特定情況下才會發生,這個場景就是試用了UITabBar的時候纔有。 參考:ht

原创 _mapView=[[BMKMapView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];報錯

_mapView=[[BMKMapView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];執行到這句報錯,我的原因是沒有添加bundle資源文件,或者.a文件等文件沒找到,解決辦法:刪除文

原创 button 上的標題豎着排放

聯想label換行,想到了,button的高設置大點,接着[TVBtn setTitle:@"直 播" forState:UIControlStateNormal]; [TVBtn.titleLabel setTextAlignment