فهرست منبع

修改定时器在Editor View可编辑时才开启

Pen Li 9 سال پیش
والد
کامیت
2f488b02d8

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 1 - 0
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.h

@@ -77,6 +77,7 @@
 //control cell event;
 
 @property (nonatomic,copy) NSString *class_name;
+@property (nonatomic,assign) BOOL editable;
 
 - (void)start_urgency_timer;
 - (void)cancel_urgency_timer;

+ 6 - 0
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -145,6 +145,10 @@
 
 - (void)start_urgency_timer {
     
+    if (!self.editable) {
+        return;
+    }
+    
     __weak typeof(self) weakSelf = self;
     
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
@@ -220,6 +224,8 @@
 {
     [super viewDidLoad];
     
+    self.editable = NO;
+    
     if(self.loading_msg==nil)
         self.loading_msg = @"Please Wait";
     if(self.loading_title==nil)

+ 2 - 0
RedAnt ERP Mobile/common/Functions/address/AddressEditorViewController.m

@@ -19,6 +19,8 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     
+    self.editable = YES;
+    
     UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"back"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
                                                                    style:UIBarButtonItemStylePlain
                                                                   target:self

+ 1 - 0
RedAnt ERP Mobile/common/Functions/contact/CustomerEditViewController.m

@@ -18,6 +18,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     
+    self.editable = YES;
     
     UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"back"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
                                                                     style:UIBarButtonItemStylePlain

+ 1 - 1
RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m

@@ -59,7 +59,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     
-    
+    self.editable = YES;
     
     UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"close"] imageWithRenderingMode:UIImageRenderingModeAutomatic]
                                                                     style:UIBarButtonItemStylePlain