日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

持久化雪花视图实例学习

發布時間:2023/12/10 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 持久化雪花视图实例学习 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
【實例學習】
在實踐Pdf版書中P52的例子中,繼續學習:

NSMutableArray類
??? The NSMutableArray class declares the programmatic interface to objects that manage a modifiable array of objects. This class adds insertion and deletion operations to the basic array-handling behavior inherited from NSArray.

??? NSMutableArray類,聲明可編程接口,用于管理對象的可變數組。這個類在繼承NSArray類的基礎數組操作方法上,新增添加和修改操做。

方法:
??? insertObject:atIndex:
??? removeObjectAtIndex:
??? addObject:
??? removeObject:
??? removeLastObject
??? replaceObjectAtIndex:withObject:

NSUserDefaults類
??? The NSUserDefaults class provides a programmatic interface for interacting with the defaults system. The defaults system allows an application to customize its behavior to match a user’s preferences. For example, you can allow users to determine what units of measurement your application displays or how often documents are automatically saved. Applications record such preferences by assigning values to a set of parameters in a user’s defaults database. The parameters are referred to as defaults since they’re commonly used to determine an application’s default state at startup or the way it acts by default.

??? 此類為與默認系統交互提供可編程接口。默認系統允許程序定制符合用戶呈現的的行為。

方法:
??? Getting Default Values
??? – arrayForKey:
??? – boolForKey:
??? – dataForKey:
??? – dictionaryForKey:
??? – floatForKey:
??? – integerForKey:
??? – objectForKey:
??? – stringArrayForKey:
??? – stringForKey:
??? – doubleForKey:
??? – URLForKey:
??? Setting Default Values
??? – setBool:forKey:
??? – setFloat:forKey:
??? – setInteger:forKey:
??? – setObject:forKey:
??? – setDouble:forKey:
??? – setURL:forKey:
??? Removing Defaults
??? – removeObjectForKey:

??? - synchronize:此函數是自動執行,用于保存此類的修改數據。手工調用此函數,一般情況都是在退出時候需要及時保存,不再等待自動保存。

類方法:
??? standardUserDefaults:返回共享默認對象,類型是NSUserDefaults


UIApplicationDelegate Protocol(UIApplicationDelegate協議接口)

??? The UIApplicationDelegate protocol declares methods that are implemented by the delegate of the singleton UIApplication object.
??? UIApplicationDelegate協議接口聲明單件UIApplication對象的委托函數方法。

??? 大部分都是采用默認執行,在實際開發中需要的畢竟是少數,此例子用了applicationWillTerminate,就是說程序中斷時觸發

羅列下:
??? Monitoring Application State Changes
??? – application:didFinishLaunchingWithOptions:
??? – applicationDidBecomeActive:
??? – applicationWillResignActive:
??? – applicationDidEnterBackground:
??? – applicationWillEnterForeground:
??? – applicationWillTerminate:
??? – applicationDidFinishLaunching:
??? Opening a URL Resource
??? – application:handleOpenURL:
??? – application:openURL:sourceApplication:annotation:
??? Managing Status Bar Changes
??? – application:willChangeStatusBarOrientation:duration:
??? – application:didChangeStatusBarOrientation:
??? – application:willChangeStatusBarFrame:
??? – application:didChangeStatusBarFrame:
??? Responding to System Notifications
??? – applicationDidReceiveMemoryWarning:
??? – applicationSignificantTimeChange:
??? Handling Remote Notifications
??? – application:didReceiveRemoteNotification:
??? – application:didRegisterForRemoteNotificationsWithDeviceToken:
??? – application:didFailToRegisterForRemoteNotificationsWithError:
??? Handling Local Notifications
??? – application:didReceiveLocalNotification:
??? Responding to Content Protection Changes
??? – applicationProtectedDataWillBecomeUnavailable:
??? – applicationProtectedDataDidBecomeAvailable:

最后說明下,在測試中沒有測試出那段代碼~~也就是說沒有找到觸發那個applicationWillTerminate的方法。

PS:再次說明下,+類方法,-成員方法;:意味此方法帶有參數

轉載于:https://www.cnblogs.com/GoGoagg/archive/2011/05/19/2051090.html

總結

以上是生活随笔為你收集整理的持久化雪花视图实例学习的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。