如何在iPhone中定義常用參數以便在不同的類中隨處使用。iphone中的常用參數
0
A
回答
0
寫和從的.plist文件中檢索您的參數:
NSString *filePath = @"Parameters.plist";
NSMutableDictionary* plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath];
NSString *value = [plistDict objectForKey:@"parameterName"];
0
您還可以添加公共定義的類文件(例如AppConstansts.h
),與定義(例如#define CELL_HEIGHT 44.0
)填寫,並在<Your project name>_Prefix.pch
文件通常位於下的項目「其它來源」組中添加一個導入線(#import "AppConstansts.h"
)。
做CELL_HEIGHT將會從所有源文件訪問後...
相關問題
- 1. iPhone中的存儲參數
- 2. UISlider - 參數 - iphone
- 3. iPhone中的變量參數ObjC函數
- 4. iPhone - NSError參考:常量和代碼
- 5. 函數參數中的捕獲異常
- 6. 參數異常
- 7. 參數異常
- 8. WP7中IsolatedStorageSettings中的參數異常
- 9. iPhone - 使用常量
- 10. 使用iPhone設置參數的iPhone單元測試
- 11. iPhone中的Coredata異常
- 12. iphone中的異常處理?
- 13. 參數化JUnit測試中使用數組參數的反射異常
- 14. 變量/ SQLite中的查詢參數的iPhone應用程序
- 15. scipy與通常分佈參數中的分佈參數
- 16. 是相同的常量引用參數
- 17. ModelState.AddModelError的用途,但有異常參數
- 18. 使用NavigationService的範圍異常參數
- 19. array_keys()與正常陣列中的參數
- 20. LINQ查詢中的空參數異常
- 21. std :: const中的常量參數:: remove_if
- 22. C++解析異常類中的參數
- 23. XPath中的非法參數異常
- 24. 休眠中的非法參數異常
- 25. 在android和iphone中獲取參數
- 26. 無效的參數異常
- 27. 的參數異常改寫
- 28. 常見的位置參數
- 29. Ibatis參數異常
- 30. Guide.BeginShowMessageBox參數異常