diff --git a/LGHelper/LGHelper.h b/LGHelper/LGHelper.h index df19fd2..d4d6560 100644 --- a/LGHelper/LGHelper.h +++ b/LGHelper/LGHelper.h @@ -52,6 +52,13 @@ #define kDeviceIsPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) #define kDeviceIsPhone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) +#define kiPhone5ScreenWidth 320 +#define kiPhone5ScreenHeight 568 +#define kiPhone6ScreenWidth 375 +#define kiPhone6ScreenHeight 667 +#define kiPhone6PlusScreenWidth 414 +#define kiPhone6PlusScreenHeight 736 + #define kDeviceIsPhoneSmallerOrEqual35 (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && MAX(UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height) <= 480.0) #define kDeviceIsPhoneSmallerOrEqual40 (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && MAX(UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height) <= 568.0) #define kDeviceIsPhoneSmallerOrEqual47 (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone && MAX(UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height) <= 667.0) @@ -183,7 +190,7 @@ else { dispatch_async(dispatch_get_main_queue(), block); }\ #define kNavBarHeight 44.f //self.navigationController.navigationBar.frame.size.height #define kStatusBarHeight 20.f //[UIApplication sharedApplication].statusBarFrame.size.height #define kStatusAndNavBarsHeight 64.f //([UIApplication sharedApplication].statusBarFrame.size.height+self.navigationController.navigationBar.frame.size.height) - +#define kTabBarHeight kSystemVersion >= 8.0 ? 49 : kSystemVersion >= 7.0 ? 56 : kSystemVersion >= 6.0 ? 49 : 0 // -------------------------------------------------- #pragma mark - Aspects @@ -373,10 +380,12 @@ else { dispatch_async(dispatch_get_main_queue(), block); }\ #import /** Need to send email and sms */ -@import MessageUI; +//@import MessageUI; +#import /** Need to open addresses and coorinates on map */ -@import MapKit; +//@import MapKit; +#import typedef NS_ENUM(NSUInteger, LGImageScalingMode) { diff --git a/LGHelper/LGHelper.m b/LGHelper/LGHelper.m index 47f0255..70e8a0f 100644 --- a/LGHelper/LGHelper.m +++ b/LGHelper/LGHelper.m @@ -2649,6 +2649,14 @@ - (BOOL)imagePickerControllerShowWithSourceType:(UIImagePickerControllerSourceTy if (setupHandler) setupHandler(_imagePickerController); + + //必须加上这一句,否则可能会导致在关闭弹出窗口的时候状态栏出现黑色(原因可能是修改了全局导航栏背景色) + if ([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0) { + _imagePickerController.modalPresentationStyle=UIModalPresentationOverCurrentContext; + }else{ + _imagePickerController.modalPresentationStyle=UIModalPresentationCurrentContext; + } + [viewController presentViewController:_imagePickerController animated:animated completion:presentCompletionHandler]; } diff --git a/README.md b/README.md index 8ab7d4a..cef0ad8 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ +本项目由 Friend-LGA/LGHelper fork 而来,又根据自己的需求增加了一些宏定义,并且没有合并到 Friend-LGA/LGHelper的项目当中。 + # LGHelper -iOS helper contains a lot of useful macrosses, methods and hints for every day. +iOS helper 包含了很多有用的宏和方法 -## Installation +## 安装 ### With source code -[Download repository](https://github.com/Friend-LGA/LGHelper/archive/master.zip), then add [LGHelper directory](https://github.com/Friend-LGA/LGHelper/blob/master/LGHelper/) to your project. +[Download repository](https://github.com/smartdj/LGHelper/archive/master.zip), then add [LGHelper directory](https://github.com/smartdj/LGHelper/blob/master/LGHelper/) to your project. ### With CocoaPods @@ -15,7 +17,7 @@ CocoaPods is a dependency manager for Objective-C, which automates and simplifie #### Podfile ```ruby platform :ios, '6.0' -pod 'LGHelper', '~> 1.1.0' +pod 'LGHelper', :git => 'https://github.com/smartdj/LGHelper.git' ``` ### With Carthage @@ -24,7 +26,7 @@ Carthage is a lightweight dependency manager for Swift and Objective-C. It lever #### Cartfile ``` -github "Friend-LGA/LGHelper" ~> 1.1.0 +github "smartdj/LGHelper" ~> 1.1.0 ``` ## Usage @@ -37,8 +39,8 @@ In the source files where you need to use the library, import the header file: ### More -For more details see [LGHelper.h](https://github.com/Friend-LGA/LGHelper/blob/master/LGHelper/LGHelper.h) +For more details see [LGHelper.h](https://github.com/smartdj/LGHelper/blob/master/LGHelper/LGHelper.h) ## License -LGHelper is released under the MIT license. See [LICENSE](https://raw.githubusercontent.com/Friend-LGA/LGHelper/master/LICENSE) for details. +LGHelper is released under the MIT license. See [LICENSE](https://raw.githubusercontent.com/smartdj/LGHelper/master/LICENSE) for details.