Commit 1f38935f authored by Sandy's avatar Sandy

Merge branch 'master' of https://git.oschina.net/gomore/total

Conflicts:
	total.xcodeproj/project.pbxproj
parents 53acfad5 0d826879
...@@ -605,9 +605,9 @@ ...@@ -605,9 +605,9 @@
#pragma mark -油站选择 #pragma mark -油站选择
- (void)selectedGasStation:(UIButton *)btn - (void)selectedGasStation:(UIButton *)btn
{ {
if (!self.recordSelectOrder) { // if (!self.recordSelectOrder) {
[IBTLoadingView showTextOnly:@"请先选择配油单"];return; // [IBTLoadingView showTextOnly:@"请先选择配油单"];return;
} // }
PromptTableViewController *promptVoew = [[PromptTableViewController alloc]init]; PromptTableViewController *promptVoew = [[PromptTableViewController alloc]init];
promptVoew.isBoolValue = YES; promptVoew.isBoolValue = YES;
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
@interface IBTRefreshTableView : IBTTableView @interface IBTRefreshTableView : IBTTableView
@property (assign, nonatomic) id <IBTScrollViewRefreshDelegate> refreshDelegate; @property (assign, nonatomic) id <IBTScrollViewRefreshDelegate> refreshDelegate;
@property (strong, nonatomic) UIRefreshControl *refreshControl; @property (strong, nonatomic) UIRefreshControl *refreshCtr;
@property (strong, nonatomic) IBTScrollLoadMoreView *loadMoreView; @property (strong, nonatomic) IBTScrollLoadMoreView *loadMoreView;
- (void)scrollToTopAnimated:(BOOL)animated; - (void)scrollToTopAnimated:(BOOL)animated;
......
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
[super didMoveToWindow]; [super didMoveToWindow];
if (!self.window) { if (!self.window) {
if (_refreshControl) { if (_refreshCtr) {
[_refreshControl endRefreshing]; [_refreshCtr endRefreshing];
} }
if (_refreshFooterView) { if (_refreshFooterView) {
...@@ -126,31 +126,31 @@ ...@@ -126,31 +126,31 @@
animated:animated]; animated:animated];
} }
- (void)addRefreshControlWithText:(NSString *)text { - (void)addrefreshCtrWithText:(NSString *)text {
if (!_refreshControl) { if (!_refreshCtr) {
self.refreshControl = [[UIRefreshControl alloc] init]; self.refreshCtr = [[UIRefreshControl alloc] init];
[_refreshControl addTarget:self [_refreshCtr addTarget:self
action:@selector(handleRefresh:) action:@selector(handleRefresh:)
forControlEvents:UIControlEventValueChanged]; forControlEvents:UIControlEventValueChanged];
} }
if (text.length > 0) { if (text.length > 0) {
_refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:text]; _refreshCtr.attributedTitle = [[NSAttributedString alloc] initWithString:text];
} }
if (!_refreshControl.superview) { if (!_refreshCtr.superview) {
[self addSubview:_refreshControl]; [self addSubview:_refreshCtr];
} }
} }
- (void)removeRefreshControl { - (void)removerefreshCtr {
if (_refreshControl && _refreshControl.superview) { if (_refreshCtr && _refreshCtr.superview) {
[_refreshControl removeFromSuperview]; [_refreshCtr removeFromSuperview];
} }
} }
- (void)handleRefresh:(id)sender { - (void)handleRefresh:(id)sender {
// UIRefreshControl *refreshControl = (UIRefreshControl *)sender; // UIrefreshCtr *refreshCtr = (UIrefreshCtr *)sender;
if ([_refreshDelegate respondsToSelector:@selector(startRefreshData:)]) { if ([_refreshDelegate respondsToSelector:@selector(startRefreshData:)]) {
// Do networking in |startRefreshData:| // Do networking in |startRefreshData:|
[_refreshDelegate startRefreshData:self]; [_refreshDelegate startRefreshData:self];
...@@ -182,14 +182,14 @@ ...@@ -182,14 +182,14 @@
// } // }
// //
// if (textStr.length > 0) { // if (textStr.length > 0) {
// _refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:textStr]; // _refreshCtr.attributedTitle = [[NSAttributedString alloc] initWithString:textStr];
// } // }
if (_refreshControl.refreshing) { if (_refreshCtr.refreshing) {
[_refreshControl endRefreshing]; [_refreshCtr endRefreshing];
// Fix ContentInset became -60 when UIRefreshController endRefreshing // Fix ContentInset became -60 when UIrefreshCtrler endRefreshing
// http://stackoverflow.com/questions/20101572/ios7-uirefreshcontrol-changes-contentinset // http://stackoverflow.com/questions/20101572/ios7-uirefreshCtr-changes-contentinset
if (self.contentInset.top < 0) { if (self.contentInset.top < 0) {
UIEdgeInsets inset = self.contentInset; UIEdgeInsets inset = self.contentInset;
inset.top = 0; inset.top = 0;
......
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