Created
August 26, 2013 23:25
-
-
Save darvin/6347925 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIKit extensions | |
Android UIKit functionality beyond what is available in a few cases has to offer. Apportable SDK to access this feature includes extensions UIKit. This API is not available in the IOS, so we at Android and IOS to share the same code base with # ifdef ANDROID calls to UIKit extensions is recommended that you wrap. | |
This expansion of the document ~ /. Apportable / SDK / system / UIKit / used in the corresponding header file can be found. | |
UIResponder | |
The user presses the hardware back or menu button, the buttonUpWithEvent: UIResponder chain reaction method is called. To implement this method on the Back button until the application is not responding. You usually implement this method, you can also first responder to handle memory warning will shake and gesture events. Ensure that the implementation of canBecomeFirstResponder YES is returned. You if you do not use the root view controller, you also need to call becomeFirstResponder manually. | |
- (Void) buttonUpWithEvent: (UIEvent *) event {switch (event.buttonCode) {case UIEventButtonCodeBack: / / handle back button if possible, otherwise exit (0) break; case UIEventButtonCodeMenu: / / show menu if possible. break; default: break;}} - (BOOL) canBecomeFirstResponder {return YES;} | |
UIScreen | |
UIScreen for extended use [UIScreen mainScreen] Android can query the DPI of the screen. You can also reduce the application of the virtual screen resolution to be displayed significantly different UIScreenMode can be set. | |
@ Property (nonatomic, readonly) CGFloat dpi; @ property (nonatomic, retain) UIScreenMode * currentMode; | |
The following code is currently close to the aspect ratio of the device to select the iPhone UIScreenMode. Put on top applicationDidFinishLaunching (all other cases). | |
# Ifdef ANDROID [UIScreen mainScreen]. CurrentMode = [UIScreenMode emulatedMode: UIScreenBestEmulatedMode]; # endif | |
More from UIScreenMode.h UIScreenMode options are available. This device matches the aspect ratio of your screen if you want the virtual retinal device or application is not designed for UIScreenAspectFitEmulationMode UIScreenIPhone3GEmulationMode you can try. | |
UIDevice | |
UIDevice extensions to [UIDevice currentDevice] as the Android version running on the Android device to view information. Here are some of the commonly used extensions. | |
@ Property (nonatomic, readonly) NSString * nativeCPUABI; / / eg "armeabi-v7a" @ property (nonatomic, readonly) NSString * nativeModel; / / eg @ "Xoom" @ property (nonatomic, readonly) NSString * nativeManufacturer; / / eg @ "Motorola" @ property (nonatomic, readonly) NSString * nativeSystemVersion; / / eg @ "4.2" @ property (nonatomic, readonly) NSUInteger nativeSDKVersion; / / eg Froyo is 8 @ property (nonatomic, readonly) NSString * macAddress; / / requires access_wifi_state @ property (nonatomic, readonly) NSString * odin; / / open device identifier number @ property (nonatomic, readonly) NSString * nativeSecureIdentifier; @ property (nonatomic, readonly) NSString * telephonyIdentifier; / / read_phone_state @ property (nonatomic , readonly) NSString * carrierBranding; / / eg @ "Verizon" | |
UIApplication | |
You play the game (but the menu) is recommended for low profile visibility settings (output mode) can be put in the system interface. Do not forget to wrap these calls # ifdef ANDROID. | |
/ / During game play UISystemInterfaceVisibilityStyle style = UISystemInterfaceVisibilityStyleLowProfile; [UIApplication sharedApplication]. SystemInterfaceVisibilityStyle = style; / / During menus style = UISystemInterfaceVisibilityStyleDefault; [UIApplication sharedApplication]. SystemInterfaceVisibilityStyle = style; | |
UISystemInterfaceVisibilityStyleDefault | |
UISystemInterfaceVisibilityStyleLowProfile | |
You can also install the application, you can find a way. If the string is empty, the application is probably counterfeit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment