• <sub id="h4knl"><ol id="h4knl"></ol></sub>
    <sup id="h4knl"></sup>
      <sub id="h4knl"></sub>

      <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
      1. <strong id="h4knl"></strong>

      2. iOS基礎問答面試題

        時間:2024-08-20 02:44:50 NIIT認證 我要投稿
        • 相關推薦

        iOS基礎問答面試題

          iOS 7 中的 Siri 擁有新外觀、新聲音和新功能。它的界面經過重新設計,以淡入視圖浮現于任意屏幕畫面的最上層。以下是小編整理的iOS基礎問答面試題,希望大家認真閱讀!

        iOS基礎問答面試題

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

          什么時候使用NSMutableArray,什么時候使用NSArray?

          答案:當數組在程序運行時,需要不斷變化的,使用NSMutableArray,當數組在初始化后,便不再改變的,使用NSArray。需要指出的是,使用NSArray只表明的是該數組在運行時不發生改變,即不能往NSAarry的數組里新增和刪除元素,但不表明其數組內的元素的內容不能發生改變。NSArray是線程安全的,NSMutableArray不是線程安全的,多線程使用到NSMutableArray需要注意。

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

          給出委托方法的實例,并且說出UITableVIew的Data Source方法

          答案:CocoaTouch框架中用到了大量委托,其中UITableViewDelegate就是委托機制的典型應用,是一個典型的使用委托來實現適配器模式,其中UITableViewDelegate協議是目標,tableview是適配器,實現UITableViewDelegate協議,并將自身設置為talbeview的delegate的對象,是被適配器,一般情況下該對象是UITableViewController。

          UITableVIew的Data Source方法有- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;

          - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;

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

          在應用中可以創建多少autorelease對象,是否有限制?

          答案:無

          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?

          什么時候需要在程序中創建內存池?

          答案:用戶自己創建的數據線程,則需要創建該線程的內存池

          6.When retain count increase?

          什么時候內存計數會增加?

          答案:見iOS面試題(一)

          7.What are commonly used NSObject class methods?

          類NSObject的那些方法經常被使用?

          答案:NSObject是Objetive-C的基類,其由NSObject類及一系列協議構成。

          其中類方法alloc、class、 description 對象方法init、dealloc、– performSelector:withObject:afterDelay:等經常被使用

          8.What is convenience constructor?

          什么是簡便構造方法?

          答案:簡便構造方法一般由CocoaTouch框架提供,如NSNumber的 + numberWithBool: + numberWithChar: + numberWithDouble: + numberWithFloat: + numberWithInt:

          Foundation下大部分類均有簡便構造方法,我們可以通過簡便構造方法,獲得系統給我們創建好的對象,并且不需要手動釋放。

          9.How to design universal application in Xcode?

          如何使用Xcode設計通用應用?

          答案:使用MVC模式設計應用,其中Model層完成脫離界面,即在Model層,其是可運行在任何設備上,在controller層,根據iPhone與iPad(獨有UISplitViewController)的不同特點選擇不同的viewController對象。在View層,可根據現實要求,來設計,其中以xib文件設計時,其設置其為universal。

          10.What is keyword atomic in Objective C?

          在Objetive-C什么時原子關鍵字

          答案:atomic,nonatomic見iOS面試題(一)

          11.What are UIView animations?

          UIView的動畫效果有那些?

          答案:有很多,如 UIViewAnimationOptionCurveEaseInOut UIViewAnimationOptionCurveEaseIn UIViewAnimationOptionCurveEaseOut UIViewAnimationOptionTransitionFlipFromLeft UIViewAnimationOptionTransitionFlipFromRight UIViewAnimationOptionTransitionCurlUpUIViewAnimationOptionTransitionCurlDown

          如何使用可見該博文

          12.How can you store data in iPhone applications?

          在iPhone應用中如何保存數據?

          答案:有以下幾種保存機制:

          1.通過web服務,保存在服務器上

          2.通過NSCoder固化機制,將對象保存在文件中

          3.通過SQlite或CoreData保存在文件數據庫中

          13.What is coredata?

          什么是coredata?

          答案:coredata是蘋果提供一套數據保存框架,其基于SQlite

          14.What is NSManagedObject model?

          什么是NSManagedObject模型?

          答案:NSManagedObject是NSObject的子類 ,也是coredata的重要組成部分,它是一個通用的類,實現了core data 模型層所需的基本功能,用戶可通過子類化NSManagedObject,建立自己的數據模型。

          15.What is NSManagedobjectContext?

          什么是NSManagedobjectContext?

          答案:NSManagedobjectContext對象負責應用和數據庫之間的交互。

          16.What is predicate?

          什么是謂詞?

          答案:謂詞是通過NSPredicate,是通過給定的邏輯條件作為約束條件,完成對數據的篩選。

          predicate = [NSPredicate predicateWithFormat:@"customerID == %d",n];

          a = [customers filteredArrayUsingPredicate:predicate];

          17.What kind of persistence store we can use with coredata?

          使用coredata有哪幾種持久化存儲機制?

          答案:一、存儲到文件(歸檔對象需實現NSCoping以及NSCoding兩個協議才可以) 二、存儲到plist文件(NSUserdefault) 三、存儲到Sqlite(數據庫)

        【iOS基礎問答面試題】相關文章:

        經典的Java基礎面試題03-07

        文秘基礎知識常見問答03-08

        java基礎面試題201703-30

        2017年net基礎面試題03-04

        2017年經典的Java基礎面試題03-29

        2017年單片機基礎知識問答大全「推薦」02-27

        建筑知識問答02-28

        新西蘭留學的續簽問答03-23

        word操作技巧問答03-02

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码
      3. <sub id="h4knl"><ol id="h4knl"></ol></sub>
        <sup id="h4knl"></sup>
          <sub id="h4knl"></sub>

          <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
          1. <strong id="h4knl"></strong>

          2. 中文字幕日本一区二区三区 | 亚洲综合经典在线一区二区 | 中文字幕免费大全日本一片 | 亚洲国产精品自产在线播放 | 亚洲欧美一级久久精品 | 亚洲国产天堂91久久 |