Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

移除 iOS 8 支持,项目最低从 iOS 9 开始支持 #1655

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let package = Package(
name: "TZImagePickerController",
platforms: [.iOS(.v8)],
platforms: [.iOS(.v9)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
[self presentViewController:imagePickerVc animated:YES completion:nil];

## 三. Requirements 要求
iOS 6 or later. Requires ARC
iOS6及以上系统可使用. ARC环境.
iOS 9 or later. Requires ARC
iOS9及以上系统可使用. ARC环境.

When system version is iOS6 or iOS7, Using AssetsLibrary.
When system version is iOS8 or later, Using PhotoKit.
Expand Down
2 changes: 1 addition & 1 deletion TZImagePickerController.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Pod::Spec.new do |s|
s.license = "MIT"
s.author = { "banchichen" => "tanzhenios@foxmail.com" }
s.platform = :ios
s.ios.deployment_target = "8.0"
s.ios.deployment_target = "9.0"
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "3.8.3" }
s.requires_arc = true

Expand Down
8 changes: 4 additions & 4 deletions TZImagePickerController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@
"$(PROJECT_DIR)/TZImagePickerController",
);
INFOPLIST_FILE = TZImagePickerController/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.8.3;
PRODUCT_BUNDLE_IDENTIFIER = tanzhenios2022.TZImagePickerController.www;
Expand All @@ -875,7 +875,7 @@
"$(PROJECT_DIR)/TZImagePickerController",
);
INFOPLIST_FILE = TZImagePickerController/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.8.3;
PRODUCT_BUNDLE_IDENTIFIER = tanzhenios2022.TZImagePickerController.www;
Expand Down Expand Up @@ -962,7 +962,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = TZImagePickerControllerFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 3.8.3;
OTHER_LDFLAGS = "-all_load";
Expand Down Expand Up @@ -1003,7 +1003,7 @@
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = TZImagePickerControllerFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 3.8.3;
OTHER_LDFLAGS = "-all_load";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,8 @@ - (void)setIsStatusBarDefault:(BOOL)isStatusBarDefault {
}

- (void)configBarButtonItemAppearance {
UIBarButtonItem *barItem;
if (@available(iOS 9, *)) {
barItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];
} else {
barItem = [UIBarButtonItem appearanceWhenContainedIn:[TZImagePickerController class], nil];
}
UIBarButtonItem *barItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];

NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];
textAttrs[NSForegroundColorAttributeName] = self.barItemTextColor;
textAttrs[NSFontAttributeName] = self.barItemTextFont;
Expand Down Expand Up @@ -1014,15 +1010,8 @@ + (NSString *)tz_getAppName {
}

+ (BOOL)tz_isRightToLeftLayout {
if (@available(iOS 9.0, *)) {
if ([UIView userInterfaceLayoutDirectionForSemanticContentAttribute:UIView.appearance.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft) {
return YES;
}
} else {
NSString *preferredLanguage = [NSLocale preferredLanguages].firstObject;
if ([preferredLanguage hasPrefix:@"ar-"]) {
return YES;
}
if ([UIView userInterfaceLayoutDirectionForSemanticContentAttribute:UIView.appearance.semanticContentAttribute] == UIUserInterfaceLayoutDirectionRightToLeft) {
return YES;
}
return NO;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,8 @@ - (UIImagePickerController *)imagePickerVc {
// set appearance / 改变相册选择页的导航栏外观
_imagePickerVc.navigationBar.barTintColor = self.navigationController.navigationBar.barTintColor;
_imagePickerVc.navigationBar.tintColor = self.navigationController.navigationBar.tintColor;
UIBarButtonItem *tzBarItem, *BarItem;
if (@available(iOS 9, *)) {
tzBarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];
BarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UIImagePickerController class]]];
} else {
tzBarItem = [UIBarButtonItem appearanceWhenContainedIn:[TZImagePickerController class], nil];
BarItem = [UIBarButtonItem appearanceWhenContainedIn:[UIImagePickerController class], nil];
}
UIBarButtonItem *tzBarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];
UIBarButtonItem *BarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UIImagePickerController class]]];
NSDictionary *titleTextAttributes = [tzBarItem titleTextAttributesForState:UIControlStateNormal];
[BarItem setTitleTextAttributes:titleTextAttributes forState:UIControlStateNormal];
}
Expand Down
10 changes: 2 additions & 8 deletions TZImagePickerController/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,8 @@ - (UIImagePickerController *)imagePickerVc {
// set appearance / 改变相册选择页的导航栏外观
_imagePickerVc.navigationBar.barTintColor = self.navigationController.navigationBar.barTintColor;
_imagePickerVc.navigationBar.tintColor = self.navigationController.navigationBar.tintColor;
UIBarButtonItem *tzBarItem, *BarItem;
if (@available(iOS 9, *)) {
tzBarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];
BarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UIImagePickerController class]]];
} else {
tzBarItem = [UIBarButtonItem appearanceWhenContainedIn:[TZImagePickerController class], nil];
BarItem = [UIBarButtonItem appearanceWhenContainedIn:[UIImagePickerController class], nil];
}
UIBarButtonItem *tzBarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[TZImagePickerController class]]];
UIBarButtonItem *BarItem = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UIImagePickerController class]]];
NSDictionary *titleTextAttributes = [tzBarItem titleTextAttributesForState:UIControlStateNormal];
[BarItem setTitleTextAttributes:titleTextAttributes forState:UIControlStateNormal];

Expand Down