Commit f7c5f13f authored by 肖兰月's avatar 肖兰月

dark mode

parent 6189bd1c
......@@ -487,7 +487,7 @@
TargetAttributes = {
900E657B1C2BB8D5003D9A9E = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = LTFQDC2QVX;
DevelopmentTeam = U5XPKW87TZ;
ProvisioningStyle = Automatic;
};
900E65941C2BB8D5003D9A9E = {
......@@ -796,10 +796,10 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = LTFQDC2QVX;
DEVELOPMENT_TEAM = U5XPKW87TZ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/TZImagePickerController",
......@@ -808,7 +808,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.3.2;
PRODUCT_BUNDLE_IDENTIFIER = tanzhenios2019.TZImagePickerController.www;
PRODUCT_BUNDLE_IDENTIFIER = tanzhenios2020.TZImagePickerController.www;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -820,10 +820,10 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = LTFQDC2QVX;
DEVELOPMENT_TEAM = U5XPKW87TZ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/TZImagePickerController",
......@@ -832,7 +832,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.3.2;
PRODUCT_BUNDLE_IDENTIFIER = tanzhenios2019.TZImagePickerController.www;
PRODUCT_BUNDLE_IDENTIFIER = tanzhenios2020.TZImagePickerController.www;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -844,6 +844,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = TZImagePickerControllerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = tanzhen.TZImagePickerControllerTests;
......@@ -856,6 +857,7 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = TZImagePickerControllerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = tanzhen.TZImagePickerControllerTests;
......@@ -867,6 +869,8 @@
900E65B01C2BB8D5003D9A9E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = TZImagePickerControllerUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = tanzhen.TZImagePickerControllerUITests;
......@@ -879,6 +883,8 @@
900E65B11C2BB8D5003D9A9E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = TZImagePickerControllerUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = tanzhen.TZImagePickerControllerUITests;
......
......@@ -388,7 +388,11 @@
- (void)setModel:(TZAlbumModel *)model {
_model = model;
NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:model.name attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:[UIColor blackColor]}];
UIColor *nameColor = UIColor.blackColor;
if (@available(iOS 13.0, *)) {
nameColor = UIColor.labelColor;
}
NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:model.name attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:nameColor}];
NSAttributedString *countString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@" (%zd)",model.count] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:[UIColor lightGrayColor]}];
[nameString appendAttributedString:countString];
self.titleLabel.attributedText = nameString;
......@@ -440,7 +444,11 @@
if (_titleLabel == nil) {
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont boldSystemFontOfSize:17];
if (@available(iOS 13.0, *)) {
titleLabel.textColor = UIColor.labelColor;
} else {
titleLabel.textColor = [UIColor blackColor];
}
titleLabel.textAlignment = NSTextAlignmentLeft;
[self.contentView addSubview:titleLabel];
_titleLabel = titleLabel;
......
......@@ -770,7 +770,11 @@
if (!self->_tableView) {
self->_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
self->_tableView.rowHeight = 70;
if (@available(iOS 13.0, *)) {
self->_tableView.backgroundColor = [UIColor tertiarySystemBackgroundColor];
} else {
self->_tableView.backgroundColor = [UIColor whiteColor];
}
self->_tableView.tableFooterView = [[UIView alloc] init];
self->_tableView.dataSource = self;
self->_tableView.delegate = self;
......@@ -824,6 +828,10 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
TZAlbumCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TZAlbumCell"];
if (@available(iOS 13.0, *)) {
cell.backgroundColor = UIColor.tertiarySystemBackgroundColor;
} else {
}
TZImagePickerController *imagePickerVc = (TZImagePickerController *)self.navigationController;
cell.albumCellDidLayoutSubviewsBlock = imagePickerVc.albumCellDidLayoutSubviewsBlock;
cell.albumCellDidSetModelBlock = imagePickerVc.albumCellDidSetModelBlock;
......
......@@ -165,7 +165,11 @@ static CGFloat itemMargin = 5;
- (void)configCollectionView {
_layout = [[UICollectionViewFlowLayout alloc] init];
_collectionView = [[TZCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:_layout];
if (@available(iOS 13.0, *)) {
_collectionView.backgroundColor = UIColor.tertiarySystemBackgroundColor;
} else {
_collectionView.backgroundColor = [UIColor whiteColor];
}
_collectionView.dataSource = self;
_collectionView.delegate = self;
_collectionView.alwaysBounceHorizontal = NO;
......@@ -216,14 +220,22 @@ static CGFloat itemMargin = 5;
_bottomToolBar = [[UIView alloc] initWithFrame:CGRectZero];
CGFloat rgb = 253 / 255.0;
if (@available(iOS 13.0, *)) {
_bottomToolBar.backgroundColor = UIColor.tertiarySystemBackgroundColor;
} else {
_bottomToolBar.backgroundColor = [UIColor colorWithRed:rgb green:rgb blue:rgb alpha:1.0];
}
_previewButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_previewButton addTarget:self action:@selector(previewButtonClick) forControlEvents:UIControlEventTouchUpInside];
_previewButton.titleLabel.font = [UIFont systemFontOfSize:16];
[_previewButton setTitle:tzImagePickerVc.previewBtnTitleStr forState:UIControlStateNormal];
[_previewButton setTitle:tzImagePickerVc.previewBtnTitleStr forState:UIControlStateDisabled];
if (@available(iOS 13.0, *)) {
[_previewButton setTitleColor:UIColor.labelColor forState:UIControlStateNormal];
} else {
[_previewButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
}
[_previewButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateDisabled];
_previewButton.enabled = tzImagePickerVc.selectedModels.count;
......@@ -235,7 +247,11 @@ static CGFloat itemMargin = 5;
[_originalPhotoButton setTitle:tzImagePickerVc.fullImageBtnTitleStr forState:UIControlStateNormal];
[_originalPhotoButton setTitle:tzImagePickerVc.fullImageBtnTitleStr forState:UIControlStateSelected];
[_originalPhotoButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
if (@available(iOS 13.0, *)) {
[_originalPhotoButton setTitleColor:[UIColor labelColor] forState:UIControlStateSelected];
} else {
[_originalPhotoButton setTitleColor:[UIColor blackColor] forState:UIControlStateSelected];
}
[_originalPhotoButton setImage:tzImagePickerVc.photoOriginDefImage forState:UIControlStateNormal];
[_originalPhotoButton setImage:tzImagePickerVc.photoOriginSelImage forState:UIControlStateSelected];
_originalPhotoButton.imageView.clipsToBounds = YES;
......@@ -246,7 +262,11 @@ static CGFloat itemMargin = 5;
_originalPhotoLabel = [[UILabel alloc] init];
_originalPhotoLabel.textAlignment = NSTextAlignmentLeft;
_originalPhotoLabel.font = [UIFont systemFontOfSize:16];
if (@available(iOS 13.0, *)) {
_originalPhotoLabel.textColor = [UIColor labelColor];
} else {
_originalPhotoLabel.textColor = [UIColor blackColor];
}
if (_isSelectOriginalPhoto) [self getSelectedPhotoBytes];
}
......@@ -276,7 +296,20 @@ static CGFloat itemMargin = 5;
_divideLine = [[UIView alloc] init];
CGFloat rgb2 = 222 / 255.0;
if (@available(iOS 13.0, *)) {
UIColor *divideLineDyColor = [UIColor colorWithDynamicProvider:^UIColor * _Nonnull(UITraitCollection * _Nonnull trainCollection) {
if ([trainCollection userInterfaceStyle] == UIUserInterfaceStyleLight) {
return [UIColor colorWithRed:rgb2 green:rgb2 blue:rgb2 alpha:1.0];
}
else {
CGFloat lineDarkRgb = 100 / 255.0;
return [UIColor colorWithRed:lineDarkRgb green:lineDarkRgb blue:lineDarkRgb alpha:1.0];
}
}];
_divideLine.backgroundColor = divideLineDyColor;
} else {
_divideLine.backgroundColor = [UIColor colorWithRed:rgb2 green:rgb2 blue:rgb2 alpha:1.0];
}
[_bottomToolBar addSubview:_divideLine];
[_bottomToolBar addSubview:_previewButton];
......
......@@ -14,3 +14,4 @@
@property (nonatomic, strong) TZAssetModel *model;
@end
......@@ -27,6 +27,7 @@
UIStatusBarStyle _originStatusBarStyle;
}
@property (assign, nonatomic) BOOL needShowStatusBar;
@end
#pragma clang diagnostic push
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment