Commit 2dd75e10 authored by 勾芒's avatar 勾芒

debug

parent 0d90aa7c
......@@ -210,6 +210,15 @@
ClientdetailsViewController *clientdetails = [storyboard instantiateViewControllerWithIdentifier:@"clientdetails"];
clientdetails.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
clientdetails.cellindex = indexPath.row;
//设置当前客户
__weak typeof(self) weakSelf = self;
[clientdetails setCurrentUserBlock:^(NSInteger index,NSString *title) {
NSString *customerID = [[weakSelf.CustomerresultArray objectAtIndex_opple:indexPath.row] fid];
NSDictionary *dict = @{@"customerid":customerID,@"title":title,@"model":[weakSelf.CustomerresultArray objectAtIndex_opple:indexPath.row]};
[[NSNotificationCenter defaultCenter] postNotificationName:@"SETUPCURRENTCUSTOMER" object:dict];
}];
[self.navigationController pushViewController:clientdetails animated:YES];
}
......
......@@ -21,7 +21,8 @@
- (void)setModel:(ShopcarModel *)model
{
_model = model;
[self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:_model.goods.pictures] placeholderImage:REPLACEIMAGE];
NSArray *imagesArray = [_model.goods.pictures componentsSeparatedByString:@","];
[self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:[imagesArray firstObject]] placeholderImage:REPLACEIMAGE];
self.goodsName.text = _model.goods.name;
self.goodsCraneQuotation.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.tagPrice floatValue]];
self.goodsSpecifications.text = _model.goods.size;
......
......@@ -81,7 +81,10 @@
/**
* 用户头像
*/
@property (weak, nonatomic) IBOutlet UIImageView *customerHeader;
......
......@@ -93,6 +93,7 @@
self.changePersonInformationButton.layer.masksToBounds = YES;
self.changePersonInformationButton.layer.cornerRadius = kCornerRadius;
self.indexPage = 1;
//隐藏更改客户按钮
self.changePersonInformationButton.hidden = YES;
......@@ -103,6 +104,9 @@
self.searchPersonInformationField.delegate = self;
//监听键盘落下的通知
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(KeyboadrDismiss) name:UIKeyboardWillHideNotification object:nil];
//设置当前客户通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(SetupCurrentCustomer:) name:@"SETUPCURRENTCUSTOMER" object:nil];
//下拉刷新
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
......@@ -238,16 +242,69 @@
clientdetails.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
clientdetails.cellindex = indexPath.row;
//设置当前客户
[clientdetails setCurrentUserBlock:^(NSInteger index) {
InformationTableViewCell *cell = [self.informationTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]];
cell.setCurrentCustomer.selected = YES;
[self SetCustomerButtonClick:index];
[clientdetails setCurrentUserBlock:^(NSInteger index,NSString *title) {
if ([title isEqualToString:@"设为当前客户"]) {
InformationTableViewCell *cell = [self.informationTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]];
[self SetCustomerButtonClick:index];
cell.setCurrentCustomer.selected = YES;
}else if ([title isEqualToString:@"退出当前客户"])
{
[self ExitCurrentCustomer];
[self.addpersonInformationButton setTitle:@"添加客户信息" forState:UIControlStateNormal];
}
}];
[self.navigationController pushViewController:clientdetails animated:YES];
}
#pragma mark -设置为当前客户回调
#pragma mark -所有客户界面 设置当前客户通知回调
- (void)SetupCurrentCustomer:(NSNotification *)not
{
NSDictionary *dict = not.object;
for (InformationTableViewCell *cell in self.informationTableview.visibleCells) {
cell.setCurrentCustomer.selected = NO;
}
for (MyclientEntityModel *model in self.CustomerresultArray) {
if ([model.fid isEqualToString:dict[@"customerid"]]) {
model.selectedState = YES;
}else
{
model.selectedState = NO;
}
}
if ([dict[@"title"] isEqualToString:@"设为当前客户"]) {
MyclientEntityModel *model = dict[@"model"];
self.customerNameField.text = model.name;
self.phoneNumberField.text = model.mobile;
self.customerAddress.text = model.address;
[self.customerHeader sd_setImageWithURL:[NSURL URLWithString:model.picture] placeholderImage:TCImage(@"now")];
//保存客户信息
[Shoppersmanager manager].currentCustomer = YES;
[Customermanager manager].customerID = model.fid;
[Customermanager manager].customerName = model.name;
[Customermanager manager].customerPhoneNumber = model.mobile;
[Customermanager manager].companyName = model.address;
[Customermanager manager].cutomerAddress = model.address;
[self.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal];
self.changePersonInformationButton.hidden = NO;
[self SetupUserShoppingCarNumberRequest];
[self SetupUserRequest];
[self ChangeCustomerName];
self.customerNameField.enabled = NO;
self.customerAddress.enabled = NO;
self.phoneNumberField.enabled = NO;
self.companyNameField.enabled = NO;
}else if ([dict[@"title"] isEqualToString:@"退出当前客户"])
{
[self ExitCurrentCustomer];
}
}
#pragma mark -设置为当前客户回调2
- (void)SetCustomerButtonClick:(NSInteger)index;
{
......@@ -265,6 +322,7 @@
self.customerNameField.text = model.name;
self.phoneNumberField.text = model.mobile;
self.customerAddress.text = model.address;
[self.customerHeader sd_setImageWithURL:[NSURL URLWithString:model.picture] placeholderImage:TCImage(@"now")];
//保存客户信息
[Shoppersmanager manager].currentCustomer = YES;
[Customermanager manager].customerID = model.fid;
......@@ -327,33 +385,7 @@
if ([sender.currentTitle isEqualToString:@"退出当前客户"]) {
self.customerNameField.text = nil;
self.customerAddress.text = nil;
self.phoneNumberField.text = nil;
self.companyNameField.text = nil;
self.customerNameField.enabled = YES;
self.customerAddress.enabled = YES;
self.phoneNumberField.enabled = YES;
self.companyNameField.enabled = YES;
self.changePersonInformationButton.hidden = YES;
[Shoppersmanager manager].currentCustomer = NO;
[Customermanager manager].customerID = nil;
[Customermanager manager].customerName = nil;
[Customermanager manager].customerPhoneNumber = nil;
[Customermanager manager].companyName = nil;
[Customermanager manager].cutomerAddress = nil;
[self.changePersonInformationButton setTitle:@"更改客户信息" forState:UIControlStateNormal];
[self ChangeCustomerName];
[self QueryShoppingCarNumber];
//全部为为选中状态
for (InformationTableViewCell *cell in self.informationTableview.visibleCells) {
cell.setCurrentCustomer.selected = NO;
}
for (MyclientEntityModel *model in self.CustomerresultArray) {
model.selectedState = NO;
}
[self ExitCurrentCustomer];
[sender setTitle:@"添加客户信息" forState:UIControlStateNormal];
return;
}
......@@ -361,6 +393,37 @@
}
#pragma mark -退出当前客户
- (void)ExitCurrentCustomer
{
self.customerNameField.text = nil;
self.customerAddress.text = nil;
self.phoneNumberField.text = nil;
self.companyNameField.text = nil;
self.customerNameField.enabled = YES;
self.customerAddress.enabled = YES;
self.phoneNumberField.enabled = YES;
self.companyNameField.enabled = YES;
self.changePersonInformationButton.hidden = YES;
[Shoppersmanager manager].currentCustomer = NO;
[Customermanager manager].customerID = nil;
[Customermanager manager].customerName = nil;
[Customermanager manager].customerPhoneNumber = nil;
[Customermanager manager].companyName = nil;
[Customermanager manager].cutomerAddress = nil;
[self.changePersonInformationButton setTitle:@"更改客户信息" forState:UIControlStateNormal];
[self ChangeCustomerName];
[self QueryShoppingCarNumber];
//全部为为选中状态
for (InformationTableViewCell *cell in self.informationTableview.visibleCells) {
cell.setCurrentCustomer.selected = NO;
}
for (MyclientEntityModel *model in self.CustomerresultArray) {
model.selectedState = NO;
}
}
#pragma mark -添加客户信息请求 -新增、或者修改 ischange为真是新增
- (void)addCustomerInformation:(BOOL)isChange
......
......@@ -68,7 +68,7 @@
/**
* 设置当前客户
*/
@property (nonatomic,copy)void(^CurrentUserBlock)(NSInteger cellindex);
@property (nonatomic,copy)void(^CurrentUserBlock)(NSInteger cellindex,NSString *title);
/**
......
......@@ -120,6 +120,9 @@
self.customerPhoneNumber.text = self.model.mobile;
self.companyName.text = self.model.name;
self.customerLocation.text = self.model.address;
self.setupButton.selected = self.model.selectedState;
[self.setupButton setTitle:self.model.selectedState?@"退出当前客户":@"设为当前客户" forState:UIControlStateNormal];
}
......@@ -296,6 +299,8 @@
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/query"] WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) {
[self endRefreshingForTableView:self.ClientdetailsTableview];
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
if (remove) {
[self.shopResponseArray removeAllObjects];
......@@ -370,7 +375,6 @@
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}];
}
......@@ -384,10 +388,14 @@
#pragma mark -设为当前的客户
- (IBAction)SetupcurrentUserButtonClick:(UIButton *)sender {
if (self.CurrentUserBlock) {
self.CurrentUserBlock(_cellindex);
self.CurrentUserBlock(_cellindex,sender.currentTitle);
}
[sender setTitle:sender.selected?@"设为当前客户":@"退出当前客户" forState:UIControlStateNormal];
sender.selected = !sender.selected;
}
......@@ -399,12 +407,7 @@
sender.selected = YES;
self.orderRecordButton.selected = NO;
self.orderRecordButton.backgroundColor = kMainBlueColor;
// if (self.shopResponseArray.count == 0) {
// [self PromptinformationViewWithimage:TCImage(@"ablum-副本") withTitle:@"暂无购物袋信息~" withpoint:CGPointMake(ScreenHeight/2, ScreenWidth/2)];
// }else
// {
// [self RemovePromptinformationView];
// }
[self RemovePromptinformationView];
[self.ClientdetailsTableview.mj_header beginRefreshing];
}
......@@ -417,12 +420,7 @@
sender.selected = YES;
self.shoppingBagButton.selected = NO;
self.shoppingBagButton.backgroundColor = kMainBlueColor;
// if (self.orderRecordArray.count == 0) {
// [self PromptinformationViewWithimage:TCImage(@"changjingtubiao") withTitle:@"暂无购单订单~" withpoint:CGPointMake(ScreenHeight/2, ScreenWidth/2)];
// }else
// {
// [self RemovePromptinformationView];
// }
[self RemovePromptinformationView];
[self.ClientdetailsTableview.mj_header beginRefreshing];
}
......
......@@ -19,7 +19,8 @@
- (void)setModel:(ShopcarModel *)model
{
_model = model;
[self.goodsHeader sd_setImageWithURL:[NSURL URLWithString:_model.goods.pictures] placeholderImage:REPLACEIMAGE];
NSArray *images = [_model.goods.pictures componentsSeparatedByString:@","];
[self.goodsHeader sd_setImageWithURL:[NSURL URLWithString:[images firstObject]] placeholderImage:REPLACEIMAGE];
self.goodsName.text = _model.goods.name;
self.specifications.text = _model.goods.size;
self.goodsCode.text = _model.goods.code;
......
......@@ -20,6 +20,7 @@
- (void)setModel:(MyclientEntityModel *)model
{
_model = model;
// NSLog(@"%@",[NSURL URLWithString:_model.picture]);
[self.personHeader sd_setImageWithURL:[NSURL URLWithString:_model.picture] placeholderImage:ReplaceImage];
self.personName.text = _model.name;
self.personPhoneNumber.text = _model.mobile;
......@@ -31,9 +32,6 @@
#pragma mark -设为当前用户
- (IBAction)SelectedButtonClick:(UIButton *)sender {
......
......@@ -37,7 +37,26 @@
@implementation OrderdetailsViewController
#pragma mark -渲染完成
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
// 禁用 iOS7 返回手势
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}
}
#pragma mark -视图即将消失
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
// 开启
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}
}
- (void)viewDidLoad {
......@@ -60,6 +79,7 @@
//附加信息cell
[self.orderDetailsTableview registerNib:[UINib nibWithNibName:@"AdditionalTableViewCell" bundle:nil] forCellReuseIdentifier:@"fifthcell"];
if (self.isShowPayButton) {
[self CreateTableviewFooterView];
}
}
......@@ -76,6 +96,10 @@
self.orderDetails = [[OrderBill alloc]initWithDictionary:returnValue[@"data"] error:nil];
[self.orderDetailsTableview reloadData];
//默认弹出支付框
if (self.isShowPayButton && [self.orderDetails.order.orderState isEqualToString:@"001"]) {
[self PayButtonClick];
}
}
else
{
......
......@@ -9,7 +9,7 @@
#import "SettlementViewController.h"
@interface SettlementViewController ()<ReturnTableviewcellIndexpathdelegate>
@interface SettlementViewController ()<ReturnTableviewcellIndexpathdelegate,UITextFieldDelegate>
/**
* 支付宝二维码
......@@ -62,7 +62,8 @@
self.cancelButton.layer.cornerRadius = kCornerRadius;
self.sureButton.layer.masksToBounds = YES;
self.sureButton.layer.cornerRadius = kCornerRadius;
self.myScrollView.contentSize = CGSizeMake(0, self.view.frame.size.height+100);
self.myScrollView.contentSize = CGSizeMake(0, self.view.frame.size.height);
self.invoiceHeader.delegate = self;
}
......@@ -180,6 +181,10 @@
#pragma mark -发票类型
- (IBAction)invoiceTypeButtonClick:(UIButton *)sender {
if ([self.ISinvoiceButton.currentTitle isEqualToString:@"否"]) {
[self ErrorMBProgressView:@"请选择开票"];
return;
}
NSArray *arr = @[@"个人发票",@"公司发票"];
[self ShowPopoverViewController:CGSizeMake(100, 150) Withdatas:arr ShowButton:sender SelectedIndex:2 GetTitle:YES];
}
......@@ -337,6 +342,23 @@
}
#pragma mark -开始编辑
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
if ([self.ISinvoiceButton.currentTitle isEqualToString:@"否"]) {
[self ErrorMBProgressView:@"请选择开票"];
return NO;
}
return YES;
}
#pragma mark -结束编辑
- (void)textFieldDidEndEditing:(UITextField *)textField
{
self.myScrollView.contentOffset = CGPointMake(0, 0);
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
......
......@@ -103,7 +103,7 @@
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<inset key="titleEdgeInsets" minX="-50" minY="0.0" maxX="86" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="120" minY="6" maxX="0.0" maxY="5"/>
<state key="normal" title="" image="down_arr">
<state key="normal" title="" image="down_arr">
<color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
......
......@@ -67,6 +67,26 @@
}
#pragma mark -渲染完成
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
// 禁用 iOS7 返回手势
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}
}
#pragma mark -视图即将消失
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
// 开启
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}
}
- (void)viewDidLoad {
[super viewDidLoad];
......
......@@ -31,14 +31,15 @@
{
_model = model;
self.selectedButton.selected = _model.isSelected;
[self.goodsImageView sd_setImageWithURL:[NSURL URLWithString:_model.goods.pictures] placeholderImage:REPLACEIMAGE];
NSArray *images = [_model.goods.pictures componentsSeparatedByString:@","];
[self.goodsImageView sd_setImageWithURL:[NSURL URLWithString:[images firstObject]] placeholderImage:REPLACEIMAGE];
self.goodsInformationLabe.text = _model.goods.name;
self.specifications.text = _model.goods.size;
self.goodsCode.text = _model.goods.code;
self.tagsPriceLabe.text = [_model.goods.tagPrice stringValue];
self.clinchTextfield.text = [_model.goods.costPrice stringValue];
self.clinchTextfield.text = [_model.costPrice stringValue];
self.goodsNumbersLabe.text = [NSString stringWithFormat:@"%d",_model.goodsNum];
self.productPriceLabe.text = [NSString stringWithFormat:@"¥%.2f",[self.goodsNumbersLabe.text floatValue]*[_model.goods.costPrice floatValue]];;
self.productPriceLabe.text = [NSString stringWithFormat:@"¥%.2f",[self.goodsNumbersLabe.text floatValue]*[_model.costPrice floatValue]];;
}
#pragma mark -增加或者减少商品
......
......@@ -137,6 +137,7 @@
model.goodsId = objc.goodsId;
model.goodsNum = objc.goodsNum;
model.consumerId = objc.consumerId;
model.costPrice = objc.costPrice;
[self.shopResponseArray addObject:model];
}
[self.shoppingTableview reloadData];
......@@ -170,7 +171,7 @@
}];
//提示框回调
[cell setPromptStringBlock:^(NSString *string) {
[weakSelf promptCustomerWithString:@"格式不正确"];
[weakSelf promptCustomerWithString:string];
}];
return cell;
}
......@@ -318,7 +319,7 @@
CGFloat allPrice = 0;
for (ShopcarModel *model in self.shopResponseArray) {
if (model.isSelected) {
allPrice += [model.goods.costPrice floatValue] * model.goodsNum;
allPrice += [model.costPrice floatValue] * model.goodsNum;
}
}
self.totalpriceLabe.text = [NSString stringWithFormat:@"¥%.2f",allPrice];
......@@ -423,6 +424,7 @@
NSLog(@"%@",error);
NSLog(@"写入服务器失败");
}];
[self QueryShoppingCarNumber];
}
......
......@@ -278,6 +278,7 @@
<outlet property="companyNameField" destination="TV1-T3-a8p" id="DiF-es-3b0"/>
<outlet property="customerAddress" destination="0QQ-Iv-hqR" id="680-hg-muu"/>
<outlet property="customerAddressBack" destination="hSf-Si-HDP" id="ghx-dx-uv1"/>
<outlet property="customerHeader" destination="3z6-rk-Y7U" id="bkz-Yd-2ca"/>
<outlet property="customerNameBack" destination="KTx-r1-Mah" id="s1G-Vo-6lt"/>
<outlet property="customerNameField" destination="RkM-wZ-Ve3" id="eqI-Bh-eyW"/>
<outlet property="informationTableview" destination="hkO-uH-vEN" id="DR3-d3-WXe"/>
......@@ -327,10 +328,11 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="qXu-CL-F1I">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="qXu-CL-F1I">
<rect key="frame" x="520" y="68" width="162" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.34901960780000002" green="0.67450980390000004" blue="0.86274509799999999" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="设为当前客户">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
......@@ -1179,7 +1181,7 @@
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="productcell" id="J5m-0M-uqb" customClass="ProductCollectionViewCell">
<rect key="frame" x="0.0" y="64" width="300" height="300"/>
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
......@@ -1261,7 +1263,7 @@
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="productDetailscell" rowHeight="170" id="Sye-2R-IQf" customClass="ProductDetailsTableViewCell">
<rect key="frame" x="0.0" y="113.5" width="768" height="170"/>
<rect key="frame" x="0.0" y="49.5" width="768" height="170"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sye-2R-IQf" id="CXs-SR-gHP">
<rect key="frame" x="0.0" y="0.0" width="768" height="169.5"/>
......
......@@ -133,19 +133,29 @@
#pragma mark -显示错误的提示框
- (void)ErrorMBProgressView:(NSString *)errorString
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view.window animated:YES];
// Set the custom view mode to show any view.
hud.mode = MBProgressHUDModeCustomView;
// Set an image view with a checkmark.
UIImage *image = [[UIImage imageNamed:@"Error"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
hud.customView = [[UIImageView alloc] initWithImage:image];
// Looks a bit nicer if we make it square.
hud.square = YES;
// Optional label text.
hud.activityIndicatorColor = kMainBlueColor;
hud.labelFont = [UIFont systemFontOfSize:12];
// MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view.window animated:YES];
// // Set the custom view mode to show any view.
// hud.mode = MBProgressHUDModeText;
// // Set an image view with a checkmark.
//// UIImage *image = [[UIImage imageNamed:@"Error"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
//// hud.customView = [[UIImageView alloc] initWithImage:image];
// // Looks a bit nicer if we make it square.
//// hud.square = YES;
// // Optional label text.
//// hud.activityIndicatorColor = kMainBlueColor;
// hud.labelFont = [UIFont systemFontOfSize:12];
// hud.labelText = errorString;
// [hud hide:YES afterDelay:1];
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.labelText = errorString;
[hud hide:YES afterDelay:1];
hud.margin = 10.f;
hud.color = [[UIColor blackColor] colorWithAlphaComponent:0.5];
hud.minSize = CGSizeMake(200, 50);
hud.animationType = MBProgressHUDAnimationZoom;
hud.mode = MBProgressHUDModeText;
hud.removeFromSuperViewOnHide = YES;
[hud hide:YES afterDelay:1.0f];
}
......@@ -156,6 +166,8 @@
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.labelText = Text;
hud.margin = 10.f;
hud.color = [[UIColor blackColor] colorWithAlphaComponent:0.5];
hud.minSize = CGSizeMake(200, 50);
hud.animationType = MBProgressHUDAnimationZoom;
hud.mode = MBProgressHUDModeText;
hud.removeFromSuperViewOnHide = 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