OSSystem
IntroductionSystem related functions: device info, system configuration, etc
Methods
batteryLevelRetrive battery level +(float)batteryLevel; Return ValueA value form 0.0 to 1.0 createObjectInConfigurationCreate and stores an object in configuration +(void)createObjectInConfiguration:(id)object forKey:(NSString*)objectName; ParametersSee Also createObjectInConfiguration:forKey:Create and stores an object in configuration +(void)createObjectInConfiguration:(id)object forKey:(NSString*)objectName; ParametersSee Also disableIdleTimerDisable the idle timer of the app +(void)disableIdleTimer; DiscussionThis method is used to avoid the screen to autolock when the application is been idle for a time. Use this only for debugging. existObjectInConfiguration:Check if an object is created in NSUserDefaults +(BOOL)existObjectInConfiguration:(NSString*)objectName; Return ValueYES if exists getDateFormatForCurrentLocale:This method return the current locale format for the components specified. +(NSString*)getDateFormatForCurrentLocale:(NSString*)dateComponents; ParametersReturn ValueNSString* getPreferredLanguageReturn the user selected preferred language identificator. +(NSString*)getPreferredLanguage; Return ValueAn string with the language id, like canonicalized IETF BCP 47 language identifier such as “en” or “fr” invokeMethod:forObject:Invoke a mothod of an object +(void)invokeMethod:(id)methodName forObject:(id)object; ParametersDiscussionThis method is used to invoke a selector of an object. loadArrayFromResource:Load an array structure stored in a plist file inside the main bundle. +(NSMutableArray*)loadArrayFromResource:(NSString*)fileName; ParametersReturn Valuea mutable array object. DiscussionIf the file doesn't exists, this method return nil. loadDictionaryFromResource:Load a dictionary structure stored in a plist file inside the main bundle. +(NSMutableDictionary*)loadDictionaryFromResource:(NSString*)fileName; ParametersReturn Valuea mutable dictionary object. DiscussionIf the file doesn't exists, this method return nil. radians:Transforms degrees to radians +(double)radians:(double) degrees; redrawView:Redraw a view +(void)redrawView:(UIView*)view; registerUserDefaultsRegister the default values in Settings.bundle +(void)registerUserDefaults; DiscussioniOS load the Settings bundle automatically. But it doesn't register de default values. This method can do it. Call this method only once in first load, because it overwrite any previous value user entered. screenBrightScreen brightness +(float)screenBright; Return ValueA value from0.0 to 1.0 setScreenBright:Sets a new screen bright +(void)setScreenBright:(float)bright; Parameters |