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