iOS筆試題03

1. When to use NSMutableArray and when to use NSArray? 

1> 當數組元素須要動態地添加或者刪除時,用NSMutableArray數據庫

2> 當數組元素固定不變時,用NSArray數組

 

2. Give us example of what are delegate methods and what are data source methods of uitableview.

1> 代理方法:返回tableView每行的高度、監聽tableView每行的選中app

2> 數據源方法:返回tableView數據的組數和行數、每行顯示什麼數據ide

 

3. How many autoreleasepool you can create in your application? Is there any limit?

沒有限制函數

 

4. If we don’t create any autorelease pool in our application then is there any autorelease pool already provided to us?

系統會默認會不定時地建立和銷燬自動釋放池動畫

 

5. When you will create an autorelease pool in your application?

當不須要精確地控制對象的釋放時間時,能夠手動建立自動釋放池ui

 

6. When retain count increase? 

當作一次retain或者copy操做,都有可能增長計數器atom

 

7. What are commonly used NSObject class methods?

NSObject常見的類方法有:allocnewdescriptionspa

8. What is convenience constructor?便利構造函數

NSStirngstringWithFormatNSNumbernumberWithInt代理

 

9. How to design universal application in Xcode?

1> 建立項目時,Device選擇Universal

2> 能夠建立一套痛用的數據模型

3> 根據iPhone\iPad選擇不一樣的控制器(iPad可能用UISplitViewController

4> 根據iPhone\iPad選擇不一樣的界面

 

10. What is keyword atomic in Objective C?

1> atomic是原子性

2> atomic會對set方法的實現進行加鎖

 

11. What are UIView animations?

UIView封裝的核心動畫能夠經過類方法\block實現

(首尾式動畫和塊動畫)

 

12. How can you store data in iPhone applications?

1> plist屬性列表(NSArray/NSDictionary)

2> PreferenceNSUserDefaults,偏好設置)通常不用

3> 鍵值歸檔(NSKeyedArchiverNSCoding

4> SQLite3數據庫

5> Core Data

 

13. What is NSManagedObject model?

NSManagedObjectCore Data中的實體對象

 

14. What is predicate?

謂詞:能夠以必定條件來過濾數組、字典等集合數據,也能用在Core Data的數據查詢中

相關文章
相關標籤/搜索