Commit 46c34c2e authored by tanzhen's avatar tanzhen

修改错别字...

parent d88890c8
......@@ -368,7 +368,7 @@
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
self.navigationItem.title = [NSBundle tz_localizedStringForKey:@"Photos"];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:[NSBundle tz_localizedStringForKey:@"Cancle"] style:UIBarButtonItemStylePlain target:self action:@selector(cancel)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:[NSBundle tz_localizedStringForKey:@"Cancel"] style:UIBarButtonItemStylePlain target:self action:@selector(cancel)];
[self configTableView];
}
......
......@@ -69,7 +69,7 @@ static CGSize AssetGridThumbnailSize;
_shouldScrollToBottom = YES;
self.view.backgroundColor = [UIColor whiteColor];
self.navigationItem.title = _model.name;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:[NSBundle tz_localizedStringForKey:@"Cancle"] style:UIBarButtonItemStylePlain target:self action:@selector(cancel)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:[NSBundle tz_localizedStringForKey:@"Cancel"] style:UIBarButtonItemStylePlain target:self action:@selector(cancel)];
_showTakePhotoBtn = (([[TZImageManager manager] isCameraRollAlbum:_model.name]) && tzImagePickerVc.allowTakePicture);
if (!tzImagePickerVc.sortAscendingByModificationDate && _isFirstAppear && iOS8Later) {
[[TZImageManager manager] getCameraRollAlbum:tzImagePickerVc.allowPickingVideo allowPickingImage:tzImagePickerVc.allowPickingImage completion:^(TZAlbumModel *model) {
......@@ -428,7 +428,7 @@ static CGSize AssetGridThumbnailSize;
NSString *appName = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleDisplayName"];
if (!appName) appName = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleName"];
NSString *message = [NSString stringWithFormat:[NSBundle tz_localizedStringForKey:@"Please allow %@ to access your camera in \"Settings -> Privacy -> Camera\""],appName];
UIAlertView * alert = [[UIAlertView alloc]initWithTitle:[NSBundle tz_localizedStringForKey:@"Can not use camera"] message:message delegate:self cancelButtonTitle:[NSBundle tz_localizedStringForKey:@"Cancle"] otherButtonTitles:[NSBundle tz_localizedStringForKey:@"Setting"], nil];
UIAlertView * alert = [[UIAlertView alloc]initWithTitle:[NSBundle tz_localizedStringForKey:@"Can not use camera"] message:message delegate:self cancelButtonTitle:[NSBundle tz_localizedStringForKey:@"Cancel"] otherButtonTitles:[NSBundle tz_localizedStringForKey:@"Setting"], nil];
[alert show];
#pragma clang diagnostic pop
} else { // 调用相机
......
......@@ -76,6 +76,7 @@
}
- (void)configCollectionView {
// 如不需要长按排序效果,将LxGridViewFlowLayout类改成UICollectionViewFlowLayout即可
LxGridViewFlowLayout *layout = [[LxGridViewFlowLayout alloc] init];
_margin = 4;
_itemWH = (self.view.tz_width - 2 * _margin - 4) / 3 - _margin;
......@@ -162,6 +163,9 @@
}
}
#pragma mark - LxGridViewDataSource
/// 以下三个方法为长按排序相关代码
- (BOOL)collectionView:(UICollectionView *)collectionView canMoveItemAtIndexPath:(NSIndexPath *)indexPath {
return indexPath.item < _selectedPhotos.count;
}
......@@ -171,7 +175,6 @@
}
- (void)collectionView:(UICollectionView *)collectionView itemAtIndexPath:(NSIndexPath *)sourceIndexPath didMoveToIndexPath:(NSIndexPath *)destinationIndexPath {
UIImage *image = _selectedPhotos[sourceIndexPath.item];
[_selectedPhotos removeObjectAtIndex:sourceIndexPath.item];
[_selectedPhotos insertObject:image atIndex:destinationIndexPath.item];
......
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