Commit 1dd299d1 authored by Fnoz's avatar Fnoz Committed by LuWeijun

Modify 'Lable's to 'Label's;

parent 37d517d9
......@@ -235,7 +235,7 @@
@interface TZAlbumCell ()
@property (weak, nonatomic) UIImageView *posterImageView;
@property (weak, nonatomic) UILabel *titleLable;
@property (weak, nonatomic) UILabel *titleLabel;
@property (weak, nonatomic) UIImageView *arrowImageView;
@end
......@@ -247,7 +247,7 @@
NSMutableAttributedString *nameString = [[NSMutableAttributedString alloc] initWithString:model.name attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:[UIColor blackColor]}];
NSAttributedString *countString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@" (%zd)",model.count] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16],NSForegroundColorAttributeName:[UIColor lightGrayColor]}];
[nameString appendAttributedString:countString];
self.titleLable.attributedText = nameString;
self.titleLabel.attributedText = nameString;
[[TZImageManager manager] getPostImageWithAlbumModel:model completion:^(UIImage *postImage) {
self.posterImageView.image = postImage;
}];
......@@ -283,17 +283,17 @@
return _posterImageView;
}
- (UILabel *)titleLable {
if (_titleLable == nil) {
UILabel *titleLable = [[UILabel alloc] init];
titleLable.font = [UIFont boldSystemFontOfSize:17];
titleLable.frame = CGRectMake(80, 0, self.tz_width - 80 - 50, self.tz_height);
titleLable.textColor = [UIColor blackColor];
titleLable.textAlignment = NSTextAlignmentLeft;
[self.contentView addSubview:titleLable];
_titleLable = titleLable;
- (UILabel *)titleLabel {
if (_titleLabel == nil) {
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.font = [UIFont boldSystemFontOfSize:17];
titleLabel.frame = CGRectMake(80, 0, self.tz_width - 80 - 50, self.tz_height);
titleLabel.textColor = [UIColor blackColor];
titleLabel.textAlignment = NSTextAlignmentLeft;
[self.contentView addSubview:titleLabel];
_titleLabel = titleLabel;
}
return _titleLable;
return _titleLabel;
}
- (UIImageView *)arrowImageView {
......
......@@ -78,14 +78,14 @@
}
[_toolBar addSubview:_doneButton];
UILabel *byteLable = [[UILabel alloc] init];
byteLable.textColor = [UIColor whiteColor];
byteLable.font = [UIFont systemFontOfSize:13];
byteLable.frame = CGRectMake(10, 0, 100, 44);
UILabel *byteLabel = [[UILabel alloc] init];
byteLabel.textColor = [UIColor whiteColor];
byteLabel.font = [UIFont systemFontOfSize:13];
byteLabel.frame = CGRectMake(10, 0, 100, 44);
[[TZImageManager manager] getPhotosBytesWithArray:@[_model] completion:^(NSString *totalBytes) {
byteLable.text = totalBytes;
byteLabel.text = totalBytes;
}];
[_toolBar addSubview:byteLable];
[_toolBar addSubview:byteLabel];
[self.view addSubview:_toolBar];
}
......
......@@ -16,7 +16,7 @@
@interface TZImagePickerController () {
NSTimer *_timer;
UILabel *_tipLable;
UILabel *_tipLabel;
UIButton *_settingBtn;
BOOL _pushPhotoPickerVc;
BOOL _didPushPhotoPickerVc;
......@@ -24,7 +24,7 @@
UIButton *_progressHUD;
UIView *_HUDContainer;
UIActivityIndicatorView *_HUDIndicatorView;
UILabel *_HUDLable;
UILabel *_HUDLabel;
UIStatusBarStyle _originStatusBarStyle;
}
......@@ -143,17 +143,17 @@
[self configDefaultSetting];
if (![[TZImageManager manager] authorizationStatusAuthorized]) {
_tipLable = [[UILabel alloc] init];
_tipLable.frame = CGRectMake(8, 120, self.view.tz_width - 16, 60);
_tipLable.textAlignment = NSTextAlignmentCenter;
_tipLable.numberOfLines = 0;
_tipLable.font = [UIFont systemFontOfSize:16];
_tipLable.textColor = [UIColor blackColor];
_tipLabel = [[UILabel alloc] init];
_tipLabel.frame = CGRectMake(8, 120, self.view.tz_width - 16, 60);
_tipLabel.textAlignment = NSTextAlignmentCenter;
_tipLabel.numberOfLines = 0;
_tipLabel.font = [UIFont systemFontOfSize:16];
_tipLabel.textColor = [UIColor blackColor];
NSString *appName = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleDisplayName"];
if (!appName) appName = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleName"];
NSString *tipText = [NSString stringWithFormat:[NSBundle tz_localizedStringForKey:@"Allow %@ to access your album in \"Settings -> Privacy -> Photos\""],appName];
_tipLable.text = tipText;
[self.view addSubview:_tipLable];
_tipLabel.text = tipText;
[self.view addSubview:_tipLabel];
_settingBtn = [UIButton buttonWithType:UIButtonTypeSystem];
[_settingBtn setTitle:self.settingBtnTitleStr forState:UIControlStateNormal];
......@@ -253,7 +253,7 @@
- (void)observeAuthrizationStatusChange {
if ([[TZImageManager manager] authorizationStatusAuthorized]) {
[_tipLable removeFromSuperview];
[_tipLabel removeFromSuperview];
[_settingBtn removeFromSuperview];
[_timer invalidate];
_timer = nil;
......@@ -301,14 +301,14 @@
_HUDIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
_HUDIndicatorView.frame = CGRectMake(45, 15, 30, 30);
_HUDLable = [[UILabel alloc] init];
_HUDLable.frame = CGRectMake(0,40, 120, 50);
_HUDLable.textAlignment = NSTextAlignmentCenter;
_HUDLable.text = self.processHintStr;
_HUDLable.font = [UIFont systemFontOfSize:15];
_HUDLable.textColor = [UIColor whiteColor];
_HUDLabel = [[UILabel alloc] init];
_HUDLabel.frame = CGRectMake(0,40, 120, 50);
_HUDLabel.textAlignment = NSTextAlignmentCenter;
_HUDLabel.text = self.processHintStr;
_HUDLabel.font = [UIFont systemFontOfSize:15];
_HUDLabel.textColor = [UIColor whiteColor];
[_HUDContainer addSubview:_HUDLable];
[_HUDContainer addSubview:_HUDLabel];
[_HUDContainer addSubview:_HUDIndicatorView];
[_progressHUD addSubview:_HUDContainer];
}
......
......@@ -22,9 +22,9 @@
UIButton *_previewButton;
UIButton *_doneButton;
UIImageView *_numberImageView;
UILabel *_numberLable;
UILabel *_numberLabel;
UIButton *_originalPhotoButton;
UILabel *_originalPhotoLable;
UILabel *_originalPhotoLabel;
BOOL _shouldScrollToBottom;
BOOL _showTakePhotoBtn;
......@@ -197,11 +197,11 @@ static CGSize AssetGridThumbnailSize;
_originalPhotoButton.selected = _isSelectOriginalPhoto;
_originalPhotoButton.enabled = tzImagePickerVc.selectedModels.count > 0;
_originalPhotoLable = [[UILabel alloc] init];
_originalPhotoLable.frame = CGRectMake(fullImageWidth + 46, 0, 80, 50);
_originalPhotoLable.textAlignment = NSTextAlignmentLeft;
_originalPhotoLable.font = [UIFont systemFontOfSize:16];
_originalPhotoLable.textColor = [UIColor blackColor];
_originalPhotoLabel = [[UILabel alloc] init];
_originalPhotoLabel.frame = CGRectMake(fullImageWidth + 46, 0, 80, 50);
_originalPhotoLabel.textAlignment = NSTextAlignmentLeft;
_originalPhotoLabel.font = [UIFont systemFontOfSize:16];
_originalPhotoLabel.textColor = [UIColor blackColor];
if (_isSelectOriginalPhoto) [self getSelectedPhotoBytes];
}
......@@ -220,14 +220,14 @@ static CGSize AssetGridThumbnailSize;
_numberImageView.hidden = tzImagePickerVc.selectedModels.count <= 0;
_numberImageView.backgroundColor = [UIColor clearColor];
_numberLable = [[UILabel alloc] init];
_numberLable.frame = _numberImageView.frame;
_numberLable.font = [UIFont systemFontOfSize:15];
_numberLable.textColor = [UIColor whiteColor];
_numberLable.textAlignment = NSTextAlignmentCenter;
_numberLable.text = [NSString stringWithFormat:@"%zd",tzImagePickerVc.selectedModels.count];
_numberLable.hidden = tzImagePickerVc.selectedModels.count <= 0;
_numberLable.backgroundColor = [UIColor clearColor];
_numberLabel = [[UILabel alloc] init];
_numberLabel.frame = _numberImageView.frame;
_numberLabel.font = [UIFont systemFontOfSize:15];
_numberLabel.textColor = [UIColor whiteColor];
_numberLabel.textAlignment = NSTextAlignmentCenter;
_numberLabel.text = [NSString stringWithFormat:@"%zd",tzImagePickerVc.selectedModels.count];
_numberLabel.hidden = tzImagePickerVc.selectedModels.count <= 0;
_numberLabel.backgroundColor = [UIColor clearColor];
UIView *divide = [[UIView alloc] init];
CGFloat rgb2 = 222 / 255.0;
......@@ -238,10 +238,10 @@ static CGSize AssetGridThumbnailSize;
[bottomToolBar addSubview:_previewButton];
[bottomToolBar addSubview:_doneButton];
[bottomToolBar addSubview:_numberImageView];
[bottomToolBar addSubview:_numberLable];
[bottomToolBar addSubview:_numberLabel];
[self.view addSubview:bottomToolBar];
[self.view addSubview:_originalPhotoButton];
[_originalPhotoButton addSubview:_originalPhotoLable];
[_originalPhotoButton addSubview:_originalPhotoLabel];
}
#pragma mark - Click Event
......@@ -254,7 +254,7 @@ static CGSize AssetGridThumbnailSize;
- (void)originalPhotoButtonClick {
_originalPhotoButton.selected = !_originalPhotoButton.isSelected;
_isSelectOriginalPhoto = _originalPhotoButton.isSelected;
_originalPhotoLable.hidden = !_originalPhotoButton.isSelected;
_originalPhotoLabel.hidden = !_originalPhotoButton.isSelected;
if (_isSelectOriginalPhoto) [self getSelectedPhotoBytes];
}
......@@ -484,12 +484,12 @@ static CGSize AssetGridThumbnailSize;
_doneButton.enabled = tzImagePickerVc.selectedModels.count > 0 || tzImagePickerVc.alwaysEnableDoneBtn;
_numberImageView.hidden = tzImagePickerVc.selectedModels.count <= 0;
_numberLable.hidden = tzImagePickerVc.selectedModels.count <= 0;
_numberLable.text = [NSString stringWithFormat:@"%zd",tzImagePickerVc.selectedModels.count];
_numberLabel.hidden = tzImagePickerVc.selectedModels.count <= 0;
_numberLabel.text = [NSString stringWithFormat:@"%zd",tzImagePickerVc.selectedModels.count];
_originalPhotoButton.enabled = tzImagePickerVc.selectedModels.count > 0;
_originalPhotoButton.selected = (_isSelectOriginalPhoto && _originalPhotoButton.enabled);
_originalPhotoLable.hidden = (!_originalPhotoButton.isSelected);
_originalPhotoLabel.hidden = (!_originalPhotoButton.isSelected);
if (_isSelectOriginalPhoto) [self getSelectedPhotoBytes];
}
......@@ -514,7 +514,7 @@ static CGSize AssetGridThumbnailSize;
- (void)getSelectedPhotoBytes {
TZImagePickerController *imagePickerVc = (TZImagePickerController *)self.navigationController;
[[TZImageManager manager] getPhotosBytesWithArray:imagePickerVc.selectedModels completion:^(NSString *totalBytes) {
_originalPhotoLable.text = [NSString stringWithFormat:@"(%@)",totalBytes];
_originalPhotoLabel.text = [NSString stringWithFormat:@"(%@)",totalBytes];
}];
}
......
......@@ -26,9 +26,9 @@
UIView *_toolBar;
UIButton *_doneButton;
UIImageView *_numberImageView;
UILabel *_numberLable;
UILabel *_numberLabel;
UIButton *_originalPhotoButton;
UILabel *_originalPhotoLable;
UILabel *_originalPhotoLabel;
}
@property (nonatomic, assign) BOOL isHideNaviBar;
@property (nonatomic, strong) UIView *cropBgView;
......@@ -123,12 +123,12 @@
[_originalPhotoButton setImage:[UIImage imageNamedFromMyBundle:_tzImagePickerVc.photoPreviewOriginDefImageName] forState:UIControlStateNormal];
[_originalPhotoButton setImage:[UIImage imageNamedFromMyBundle:_tzImagePickerVc.photoOriginSelImageName] forState:UIControlStateSelected];
_originalPhotoLable = [[UILabel alloc] init];
_originalPhotoLable.frame = CGRectMake(fullImageWidth + 42, 0, 80, 44);
_originalPhotoLable.textAlignment = NSTextAlignmentLeft;
_originalPhotoLable.font = [UIFont systemFontOfSize:13];
_originalPhotoLable.textColor = [UIColor whiteColor];
_originalPhotoLable.backgroundColor = [UIColor clearColor];
_originalPhotoLabel = [[UILabel alloc] init];
_originalPhotoLabel.frame = CGRectMake(fullImageWidth + 42, 0, 80, 44);
_originalPhotoLabel.textAlignment = NSTextAlignmentLeft;
_originalPhotoLabel.font = [UIFont systemFontOfSize:13];
_originalPhotoLabel.textColor = [UIColor whiteColor];
_originalPhotoLabel.backgroundColor = [UIColor clearColor];
if (_isSelectOriginalPhoto) [self showPhotoBytes];
}
......@@ -144,20 +144,20 @@
_numberImageView.frame = CGRectMake(self.view.tz_width - 56 - 28, 7, 30, 30);
_numberImageView.hidden = _tzImagePickerVc.selectedModels.count <= 0;
_numberLable = [[UILabel alloc] init];
_numberLable.frame = _numberImageView.frame;
_numberLable.font = [UIFont systemFontOfSize:15];
_numberLable.textColor = [UIColor whiteColor];
_numberLable.textAlignment = NSTextAlignmentCenter;
_numberLable.text = [NSString stringWithFormat:@"%zd",_tzImagePickerVc.selectedModels.count];
_numberLable.hidden = _tzImagePickerVc.selectedModels.count <= 0;
_numberLable.backgroundColor = [UIColor clearColor];
[_originalPhotoButton addSubview:_originalPhotoLable];
_numberLabel = [[UILabel alloc] init];
_numberLabel.frame = _numberImageView.frame;
_numberLabel.font = [UIFont systemFontOfSize:15];
_numberLabel.textColor = [UIColor whiteColor];
_numberLabel.textAlignment = NSTextAlignmentCenter;
_numberLabel.text = [NSString stringWithFormat:@"%zd",_tzImagePickerVc.selectedModels.count];
_numberLabel.hidden = _tzImagePickerVc.selectedModels.count <= 0;
_numberLabel.backgroundColor = [UIColor clearColor];
[_originalPhotoButton addSubview:_originalPhotoLabel];
[_toolBar addSubview:_doneButton];
[_toolBar addSubview:_originalPhotoButton];
[_toolBar addSubview:_numberImageView];
[_toolBar addSubview:_numberLable];
[_toolBar addSubview:_numberLabel];
[self.view addSubview:_toolBar];
}
......@@ -313,7 +313,7 @@
- (void)originalPhotoButtonClick {
_originalPhotoButton.selected = !_originalPhotoButton.isSelected;
_isSelectOriginalPhoto = _originalPhotoButton.isSelected;
_originalPhotoLable.hidden = !_originalPhotoButton.isSelected;
_originalPhotoLabel.hidden = !_originalPhotoButton.isSelected;
if (_isSelectOriginalPhoto) {
[self showPhotoBytes];
if (!_selectButton.isSelected) {
......@@ -391,12 +391,12 @@
TZImagePickerController *_tzImagePickerVc = (TZImagePickerController *)self.navigationController;
TZAssetModel *model = _models[_currentIndex];
_selectButton.selected = model.isSelected;
_numberLable.text = [NSString stringWithFormat:@"%zd",_tzImagePickerVc.selectedModels.count];
_numberLabel.text = [NSString stringWithFormat:@"%zd",_tzImagePickerVc.selectedModels.count];
_numberImageView.hidden = (_tzImagePickerVc.selectedModels.count <= 0 || _isHideNaviBar || _isCropImage);
_numberLable.hidden = (_tzImagePickerVc.selectedModels.count <= 0 || _isHideNaviBar || _isCropImage);
_numberLabel.hidden = (_tzImagePickerVc.selectedModels.count <= 0 || _isHideNaviBar || _isCropImage);
_originalPhotoButton.selected = _isSelectOriginalPhoto;
_originalPhotoLable.hidden = !_originalPhotoButton.isSelected;
_originalPhotoLabel.hidden = !_originalPhotoButton.isSelected;
if (_isSelectOriginalPhoto) [self showPhotoBytes];
// If is previewing video, hide original photo button
......@@ -404,10 +404,10 @@
if (!_isHideNaviBar) {
if (model.type == TZAssetModelMediaTypeVideo) {
_originalPhotoButton.hidden = YES;
_originalPhotoLable.hidden = YES;
_originalPhotoLabel.hidden = YES;
} else {
_originalPhotoButton.hidden = NO;
if (_isSelectOriginalPhoto) _originalPhotoLable.hidden = NO;
if (_isSelectOriginalPhoto) _originalPhotoLabel.hidden = NO;
}
}
......@@ -415,18 +415,18 @@
_selectButton.hidden = !_tzImagePickerVc.showSelectBtn;
// 让宽度/高度小于 最小可选照片尺寸 的图片不能选中
if (![[TZImageManager manager] isPhotoSelectableWithAsset:model.asset]) {
_numberLable.hidden = YES;
_numberLabel.hidden = YES;
_numberImageView.hidden = YES;
_selectButton.hidden = YES;
_originalPhotoButton.hidden = YES;
_originalPhotoLable.hidden = YES;
_originalPhotoLabel.hidden = YES;
_doneButton.hidden = YES;
}
}
- (void)showPhotoBytes {
[[TZImageManager manager] getPhotosBytesWithArray:@[_models[_currentIndex]] completion:^(NSString *totalBytes) {
_originalPhotoLable.text = [NSString stringWithFormat:@"(%@)",totalBytes];
_originalPhotoLabel.text = [NSString stringWithFormat:@"(%@)",totalBytes];
}];
}
......
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