Commit 24cda19e authored by admin's avatar admin

修改bug

parent 810ea6c9
......@@ -70,17 +70,33 @@
// 移除显示Image的Button
[button.superview removeFromSuperview];
CGFloat btnH = 110;
CGFloat marginY = 10;
int count = (int)self.footerView.takePhotoView.allImages.count + 1;
int k ;
if (count % 2 == 0) {
k = count / 2;
} else {
k = (count + 1) / 2;
}
self.footerView.takePhotoView.frame = CGRectMake(0, 40, kScreenWidth, k * btnH + (k + 1) * marginY);
self.footerView.height = self.footerView.takePhotoView.frame.size.height + 220;
}
- (void)createImagePicker
{
// 创建相册
UIImagePickerController *pc = [[UIImagePickerController alloc] init];
pc.allowsEditing = YES;
pc.delegate = self;
// 推出
[self presentViewController:pc animated:YES completion:nil];
if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:nil message:@"Unable to find the camera" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[alert show];
} else {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
picker.videoQuality = UIImagePickerControllerQualityTypeLow;
[self presentViewController:picker animated:YES completion:nil];
}
}
- (void)takePhotoShowPicture:(UIButton *)btn
......@@ -93,7 +109,7 @@
#pragma mark - UIImagePickerController 代理方法
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
// 创建一个新的控件
UIButton *newButton = [self.footerView.takePhotoView createButtonWithImage:image];
......@@ -114,7 +130,6 @@
CGFloat marginY = 10;
self.footerView.takePhotoView.frame = CGRectMake(0, 40, kScreenWidth, k * btnH + (k + 1) * marginY);
self.footerView.height = self.footerView.takePhotoView.frame.size.height + 220;
NSLog(@"self.footerView = %f", self.footerView.frame.size.height);
// 退出图片选择控制器
[picker dismissViewControllerAnimated:YES completion:nil];
}
......
......@@ -121,7 +121,6 @@
self.tableView.tableHeaderView = self.headView;
//
[self requestRankingList];
// 巡检列表
......
......@@ -127,7 +127,6 @@
return;
}
HttpClient *httpClient = [[HttpClient alloc] initWithLogin];
UIWindow *window = [[UIApplication sharedApplication].windows lastObject];
[MBProgressHUD showHUDAddedTo:window animated:YES];
......
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