iOS各類問題處理

本文轉載至:http://www.cnblogs.com/ygm900/category/436923.html
推薦初學者前去學習。
 
 
摘要: 解決以下:即某文件夾下出現多重子目錄,級數不少,刪除多餘的子文件夾便可。至於如何產生的,有人說是xcode升級致使,不過沒有見證 。個人不屬於這類狀況的。(參見:http://macosx.com/forums/mac-os-x-system-mac-software/321289-error-code-8060-cant-access-files-were-once-there.html) 閱讀全文
posted @  2013-09-12 09:27 ygm900 閱讀(7) |  評論 (0)  編輯
 
摘要: 模擬器默認的配置種沒有「小地球」,只能輸入英文。加入中文方法以下:找到模擬器的Settings--->General-->Keyboard-->International KeyBoards-->Add New Keyboard-->Chinese Simplified(PinYin) 即咱們通常用的簡體中文拼音輸入法,配置好後,再輸入文字時,點擊彈出鍵盤上的「小地球」就能夠輸入中文了。 閱讀全文
posted @  2013-09-09 13:11 ygm900 閱讀(26) |  評論 (0)  編輯
 
 
摘要: 解決方案:將項目的Debugger模式設置爲 GDB 便可。(LLDB下不打印中文)第一步:第二步: 閱讀全文
posted @  2013-07-18 11:44 ygm900 閱讀(18) |  評論 (0)  編輯
 
摘要: 先確認證書是否正確再確認Bundle Indentifier 是否與證書匹配再確認Deployment Target 爲:sdk從6.0改成4.3若是xcode還沒法識別iphone, Xcode->window->Organizer->Devices查看測試機鏈接狀態是否爲綠色,若是沒法鏈接,我記得有個use for development選項,點擊就能夠了; 固然全部的前提是你的設備的UDID已經添加到測試機裏,或是爲越獄機、Xcode必須已安裝你的設備對應的編譯環境轉http://blog.sina.com.cn/s/blog_8aecea5f0101axhf.html 閱讀全文
posted @  2013-07-15 18:01 ygm900 閱讀(18) |  評論 (0)  編輯
 
摘要: 一、使用類目在咱們的靜態庫中涉及到 類目 catagory的使用時,會崩潰;此時咱們須要設置project的Info裏面的Link Flag處,增長-all_load,這樣會連接因此存在的symbol;這是咱們經常使用的一種處理方法,除此以外咱們還可使用如下方法:若咱們使用了類目"NSObject+SBJSON.h"咱們在h,m文件分別增長如下聲明@interface DummyClass_NSObject_SBJSON {}@end@implementation DummyClass_NSObject_SBJSON@end二、使用nib若封裝靜態庫的時候咱們使用了xib文件 閱讀全文
posted @  2013-07-15 13:36 ygm900 閱讀(27) |  評論 (0)  編輯
 
摘要: 1. warning: Semantic Issue: Writable atomic property 'number' cannot pair a synthesized setter/getter with a user definedsetter/getter 指示在AFItemView.m文件2.warning: Semantic Issue: Writable atomic property 'numberOfImages' cannot pair a synthesized setter/getter with a user definedsett 閱讀全文
posted @  2013-07-10 16:15 ygm900 閱讀(34) |  評論 (0)  編輯
 
摘要: Undefined symbols for architecturei386:「_OBJC_CLASS_$_XXX」,referenced from:objc-class-ref in XXXld: symbol(s) not found for architecture i386clang: error: linker command failed with exit code 1 (use -v to see invocation)若是真機調試就是 undefined symbols for architecture armv7錯誤!發生這種錯誤一般是project.pbxproj這個文件 閱讀全文
posted @  2013-07-09 10:37 ygm900 閱讀(547) |  評論 (0)  編輯
 
摘要: duplicate symbol _main in: /Users/mb467/Library/Developer/Xcode/DerivedData/barChartDemo-gevlnavnpanltbgqdweijouguhcx/Build/Intermediates/barChartDemo.build/Debug-iphoneos/barChartDemo.build/Objects-normal/armv7/main-CCADE8545E02147B.o /Users/mb467/Library/Developer/Xcode/DerivedData/barChartDemo-.. 閱讀全文
posted @  2013-07-08 21:33 ygm900 閱讀(357) |  評論 (0)  編輯
 
摘要: MobileCoreServices.framework 丟失後,可經過以下方式找回:一、在同事機器上拷貝一個。路徑:二、重裝一個xcode實踐:將xcode4.5下的文件拷到xcode4.3 能夠正常使用。 閱讀全文
posted @  2013-07-05 16:00 ygm900 閱讀(14) |  評論 (0)  編輯
 
摘要: 若是使用Xcode 4.5來新建項目,默認是支持AutoLayout的,可是AutoLayout是iOS 6的新特性,若是在iOS 5的simulator上運行程序,會出現Could not instantiate class named NSLayoutConstraint問題。解決方法是打開storyboard文件,去掉AutoLayout的選擇。rob mayoff的神圖一目瞭然。轉:http://procoder.cnblogs.com 閱讀全文
posted @  2013-06-30 11:34 ygm900 閱讀(12) |  評論 (0)  編輯
 
摘要: 工程缺乏響應的運行支持庫,因此纔會爆出「鏈接失敗」的問題 閱讀全文
posted @  2013-06-27 13:26 ygm900 閱讀(8) |  評論 (0)  編輯
 
摘要: 用xcode4打開xcode3創建的工程,有時候,不能自動轉換版本,就會顯示no scheme.這個是因爲XXX..xcodeproj包中xcuserdata文件夾中user.xcuserdatad文件夾名字的問題...user.xcuserdatad文件夾的名字,不是當前用戶的名字,就會顯示no scheme.只要手動更改(或者刪除)後,重啓xcode就能夠。若是仍然顯示爲no scheme,那麼請在檢查一下是否刪除乾淨。或者在xcode中點擊「no scheme」,而後創建一個scheme 便可。 閱讀全文
posted @  2013-06-27 12:28 ygm900 閱讀(8) |  評論 (0)  編輯
 
摘要: 使用 UITabBar 時,咱們長長會遇到這樣的問題。問題:一個使用(或繼承)了UITabBar的Aview,爲其添加一個子畫面Bview時,雖然Bview的尺寸已經佔滿了整個手機屏幕,可是,Bview的底部,仍然可以響應UITabBar的事件。解決:將 [Aview addSubView:Bview]; 改成[Aview.superview addSubView:Bview]; 或者Aview.superview.superview ,總之必定不要Bview 繼承UITabBar便可。 閱讀全文
posted @  2013-06-26 11:06 ygm900 閱讀(10) |  評論 (0)  編輯
 
摘要: 童鞋們都知道Xcode會根據當前SDK在Run按鈕旁邊的選項欄中顯示適合的Simulator供開發者選擇,以下圖:可是有時候則錯誤顯示「My mac 64-bit」 ,這個明顯不是咱們想要的,以下圖:上面這種狀況主要出現緣由在於你打開了另一個mac電腦copy過來的項目時或者其餘緣由形成出現,那麼解決的方法這裏Himi給出來:解決步驟:首先關閉你的Xcode,找到你出現解決此問題的項目目錄下,而後此項目的***.xcodeproj 文件,而後右鍵選擇「顯示包內容」,以下圖:通常狀況下,包中有以下3個文件:1.project.pbxproj 2.project.xcworkspace 3.xc 閱讀全文
posted @  2013-06-23 15:46 ygm900 閱讀(12) |  評論 (0)  編輯
 
摘要: Error Starting executable: error launching remote program failed to get the task for process 715這個問題的解決方案以下(本人使用的是Xcode4.3):1.Select File->New File->ios->resources->property List name the file "Entitlements.plist‘ -->Creat2.點擊這個Entitlements.plist,在右側的空白處右鍵選擇Add Row 本身新建一個"Ca 閱讀全文
posted @  2013-06-21 11:38 ygm900 閱讀(22) |  評論 (0)  編輯
 
摘要: iPhone真機調試報以下錯誤時,關掉Xcode,從新啓動就能夠了,注意是關掉Xcode,完全關掉。Error launching remote program: No such file or directory通常是由於修改了 Bundle identifier 形成的。 閱讀全文
posted @  2013-06-21 11:38 ygm900 閱讀(9) |  評論 (0)  編輯
 
摘要: 通常的問題是這樣的「bool _WebTryThreadLock(bool), 0xxxxxx: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...」緣由: update ui in background thread.解決辦法: update ui in main thread. 閱讀全文
posted @  2013-06-20 22:11 ygm900 閱讀(19) |  評論 (0)  編輯
 
摘要: Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]今天作一個tableView遇到一個這麼個問題。通過baidu google,終於找到正解。由於- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath這個函數的返回值是個null!!查stackoverflow 找到下面的解。CellIdentifier I bet your cellForR... 閱讀全文
posted @  2013-06-13 18:08 ygm900 閱讀(604) |  評論 (0)  編輯
 
摘要: 你的問題是:self.view.frame.size.height = 100f;這樣寫無法經過編譯,編譯器會報錯"expression is not assignable"緣由是,這句話裏面的幾個點有兩種不一樣的含義。self.view.frame是Objective-C語法,是讀取view屬性的frame屬性,在Objective-C中使用點來訪問屬性只是一種語法糖,因此self.view.frame這句話會被轉換成:[[self view] frame]也就是說,實際上這是消息傳遞。而frame屬性是一個CGRect結構,因此frame.size.height是C語言的 閱讀全文
posted @  2013-05-28 18:33 ygm900 閱讀(97) |  評論 (0)  編輯
 
摘要: malloc: *** mmap(size=1431658496) failed (error code=12)*** error: can't allocate region*** set a breakpoint in malloc_error_break to debug*** Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-1914.84/UITableViewRowData.m:377主要問 閱讀全文
posted @  2013-05-27 13:33 ygm900 閱讀(115) |  評論 (0)  編輯
 
摘要: 這是由於ios6中的xib有AutoLayout這個屬性,默認爲選中,而後運行在低於ios6.0的機器中,會崩潰,報*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'*** First throw call stack:這個異常。只需將AutoLayout設爲不選中便可參考:http://blog.sina.com.cn 閱讀全文
posted @  2013-05-26 00:17 ygm900 閱讀(27) |  評論 (0)  編輯
 
摘要: 原帖:http://blog.csdn.net/startexcel/article/details/7211292xib 中, 沒有對File's Owner 的Outlets view 進行綁定, 致使在父視圖中插入子視圖時出錯, 在IB中拖拽Files' Owner到view, 添加綁定後, 運行成功!總結一下建立視圖和綁定的步驟:1. 建立控制器. File->New File->Iphone OS->Cocoa Touch Class->UIViewController subclass;2. 建立xib. File->New File- 閱讀全文
posted @  2013-05-24 17:37 ygm900 閱讀(46) |  評論 (0)  編輯
 
摘要: //大全//讀取數據庫數據-(void)movethesqlitefile{NSString*sourcepath=[[NSBundlemainBundle]pathForResource:@"database"ofType:@"sqlite"];NSLog(@"===================================%@",sourcepath);NSFileManager*filemanager=[NSFileManagerdefaultManager]; NSString*documentsDirectory= [ 閱讀全文
posted @  2013-05-24 10:41 ygm900 閱讀(176) |  評論 (0)  編輯
 
摘要: 問題描述:在ios4.3系統中運行程序,調用actionSheet時,應用程序閃退 原代碼: [actionSheet showInView:[UIApplication sharedApplication].keyWindow]; //New 解決取消按鈕不靈敏的問題 替換爲以下代碼便可: [actionSheetshowInView:self.view]; 閱讀全文
posted @  2013-03-12 13:31 ygm900 閱讀(10) |  評論 (0)  編輯
 
摘要: 第一種狀況這種問題通常就是變量申請了內存並初始化了,但沒有使用此變量,接着將此變量又從新賦值。以下:NSString *imageString = [[NSString alloc] init]; imageString = @"HResout"; 第二種狀況測出的問題提示是Incorrect decrement of the reference count of an object that is not owned at this point by the caller問題出如今這一行[self.tableViewinitWithFrame:self.view.boun 閱讀全文
posted @  2013-02-04 15:19 ygm900 閱讀(290) |  評論 (0)  編輯
 
摘要: 晚上提交app的時候老是報出icon的錯誤iPad: Icon.png: icon dimensions (0 x 0) don’t meet the size requirements. The icon file must be 72×72 pixels起初覺得圖片壞了, 後來才發現好像是 10.7.3 的系統bug修復方法:將Compress PNG Files 設置爲 NO轉自:http://www.lazyid.com/2012/02/04/ipad-icon-png-icon-dimensions-0-x-0-dont-meet-the-size-requirements 閱讀全文
posted @  2013-01-28 22:34 ygm900 閱讀(70) |  評論 (0)  編輯
 
摘要: 在iOS3.0以後的版本再也不使用這樣的語法,解決方法以下:將:cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; 修改成:cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; 參考:http://forums.macrumors.com/archiv... 閱讀全文
posted @  2013-01-28 19:06 ygm900 閱讀(24) |  評論 (0)  編輯
 
摘要: UIActionSheet *menu = [[UIActionSheet alloc] initWithTitle: @"是否保存信息?"//@"保存信息到草稿" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"不保存" otherButtonTitles:@"保存", nil]; 解決方法,即在頭文件中加入:UIActionSheetDelegate代理... 閱讀全文
posted @  2013-01-28 17:48 ygm900 閱讀(25) |  評論 (0)  編輯
 
摘要: UITableViewCell *tvCell = [[[UITableViewCellalloc]initWithFrame:CGRectZeroreuseIdentifier:cellIdetify]autorelease];'initWithFrame:reuseIdentifier:' is deprecated --上述爲極不同意的寫法,建議改成以下寫法: 閱讀全文
posted @  2013-01-28 16:40 ygm900 閱讀(8) |  評論 (0)  編輯
 
摘要: //此問題修復完成後,須要編譯如下工程才能看到效果Property 'lMenuTimes' requires method 'lMenuTimes' to be defined - use @synthesize, @dynamic or provide a method implementation//當一個有返回值的方法,缺乏返回值時,會報以下警告relessorder/MenuController.m: warning: Semantic Issue: Control may reach end of non-void function//不相容的指針I 閱讀全文
posted @  2013-01-28 16:37 ygm900 閱讀(183) |  評論 (0)  編輯
 
摘要: Incorrect NSStringEncoding value 0x0000 detected. 的意思是某個NSString型的變量,被賦爲了空值。緣由以下:1)本地終端未聯網2)後臺服務器掛掉總之,前臺終端向後臺請求數據時,沒有請求到任何數據。 閱讀全文
posted @  2013-01-26 14:10 ygm900 閱讀(61) |  評論 (0)  編輯
 
摘要: Local declaration of 'content' hides instance variable通常是函數裏面定義的變量和class屬性變量重名了 閱讀全文
posted @  2013-01-26 12:24 ygm900 閱讀(19) |  評論 (0)  編輯
 
摘要: 當一個字符串爲null時,它不能被正常地使用,不然會報以下錯誤Incorrect NSStringEncoding value 0x0000 detected. Assuming NSASCIIStringEncoding. Will stop this compatiblity mapping behavior in the near future錯誤案例:當nstrPublicUrl==null時,若是咱們寫下以下代碼,就會報如上警告。//錯誤的案例,nstrPublicUrl==nil時NSString *nstrUrl = [NSString stringWithFormat:@&qu 閱讀全文
posted @  2013-01-23 23:06 ygm900 閱讀(250) |  評論 (0)  編輯
 
摘要: (一)wait_fences: failed to receive reply: 10004003的緣由:這個問題的實質應該是在非主線程中 直接修改 界面解決的方法:在後臺或子線程作的操做,刷新UI的時候,必定要在主線程進行//可能的具體狀況:一、須要實現UIAlertView的代理方法- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{}二、在viewDidLoad方法裏面生成了多個Button,在點擊button是,切換他們的selected狀態,會出現這個問題//[i 閱讀全文
posted @  2013-01-21 01:52 ygm900 閱讀(22) |  評論 (0)  編輯
 
摘要: 錯誤的寫法_checkinLocation.coordinate.longitude = 26.876812;_checkinLocation.coordinate.longitude = 100.22569199999998;正確的寫法float latitude = 26.876812; float longitude = 100.22569199999998; //這裏能夠是任意的經緯度值 CLLocation *_checkinLocation= [[[CLLocation alloc] initWithLatitude:latitude longitude:longitude] au 閱讀全文
posted @  2013-01-16 14:18 ygm900 閱讀(7) |  評論 (0)  編輯
 
摘要: 解決EXC_BAD_ACCESS錯誤的一種方法--NSZombieEnabledhttp://blog.csdn.net/likendsl/article/details/7566305 閱讀全文
posted @  2013-01-16 13:29 ygm900 閱讀(12) |  評論 (0)  編輯
 
摘要: 錯誤提示以下:分析: You are using multiline case statement. Your statements must be enclosed in{and}. The problem is declaring variables inside cases of a switch. The compiler is upset about trying to figure out scope when only some of the code is executed. If you put brackets around the contents of the ' 閱讀全文
posted @  2012-12-12 13:53 ygm900 閱讀(18) |  評論 (0)  編輯
 
摘要: 解析一個稍微大點的XML數據20萬條數據左右吧。沒想到在解析XML的某個節點中,爲了方便查看數據的解析進度,打印了一句Log,結果致使解析過程愈來愈慢。原來用XCODE打開那20萬條數據,都很費勁,在執行過程當中,爲每一條數據大一條Log,電腦直接累瘋了! 閱讀全文
posted @  2012-12-11 15:54 ygm900 閱讀(8) |  評論 (0)  編輯
 
摘要: 今天一合做夥伴傳過來兩個很大的XML文件,在iOS 程序下執行xmlTextReaderTyper(reader)方法後,老是返回0.最終發現,原來那兩個XML文件不是UTF-8編碼格式。解決方案:在PC上,使用UE將XML文件另存爲下,格式選擇UTF-8便可。 閱讀全文
posted @  2012-12-11 13:27 ygm900 閱讀(13) |  評論 (0)  編輯
相關文章
相關標籤/搜索