| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bdc73ec commit cf0831f
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,7 +83,7 @@ - (void)addTopicBtnClicked:(id)sender{ | |||
| 83 | 83 | self.myProTopic.title = _inputTitleView.text; | |
| 84 | 84 | self.myProTopic.content = _inputContentView.text; | |
| 85 | 85 | ||
| 86 | - if (_myProTopic.title.length <= 0 || _myProTopic.content <= 0) { | ||
| 86 | + if (_myProTopic.title.length <= 0 || _myProTopic.htmlMedia.contentOrigional <= 0) { | ||
| 87 | 87 | kTipAlert(@"至少写点什么吖"); | |
| 88 | 88 | return; | |
| 89 | 89 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,7 +90,7 @@ - (void)feedbackBtnClicked:(id)sender{ | |||
| 90 | 90 | self.myProTopic.title = _inputTitleView.text; | |
| 91 | 91 | self.myProTopic.content = _inputContentView.text; | |
| 92 | 92 | ||
| 93 | - if (_myProTopic.title.length <= 0 || _myProTopic.content <= 0) { | ||
| 93 | + if (_myProTopic.title.length <= 0 || _myProTopic.htmlMedia.contentOrigional <= 0) { | ||
| 94 | 94 | kTipAlert(@"至少写点什么吖"); | |
| 95 | 95 | return; | |
| 96 | 96 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ - (instancetype)initWithString:(NSString *)htmlString showType:(MediaShowType)sh | |||
| 17 | 17 | htmlString = [NSString stringWithFormat:@"<body>%@</body>", htmlString]; | |
| 18 | 18 | } | |
| 19 | 19 | ||
| 20 | - _contentDisplay = [[NSMutableString alloc] init]; | ||
| 20 | + _contentDisplay = [NSMutableString stringWithString:@""]; | ||
| 21 | 21 | _mediaItems = [[NSMutableArray alloc] init]; | |
| 22 | 22 | ||
| 23 | 23 | NSData *data=[htmlString dataUsingEncoding:NSUTF8StringEncoding]; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,7 +56,7 @@ - (NSString *)toAddTopicPath{ | |||
| 56 | 56 | } | |
| 57 | 57 | - (NSDictionary *)toAddTopicParams{ | |
| 58 | 58 | return @{@"title" : [_title aliasedString], | |
| 59 | - @"content" : [_content aliasedString]}; | ||
| 59 | + @"content" : [_htmlMedia.contentOrigional aliasedString]}; | ||
| 60 | 60 | } | |
| 61 | 61 | ||
| 62 | 62 | - (NSString *)toCommentsPath{ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,7 +50,7 @@ CG_INLINE BOOL isIPhone4() | |||
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | 52 | ||
| 53 | - @interface AbstractActionSheetPicker () | ||
| 53 | + @interface AbstractActionSheetPicker ()<UIGestureRecognizerDelegate> | ||
| 54 | 54 | ||
| 55 | 55 | @property(nonatomic, strong) UIBarButtonItem *barButtonItem; | |
| 56 | 56 | @property(nonatomic, strong) UIBarButtonItem *doneBarButtonItem; | |
@@ -486,7 +486,9 @@ - (void)configureAndPresentActionSheetForView:(UIView *)aView | |||
| 486 | 486 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIApplicationWillChangeStatusBarOrientationNotification object:nil]; | |
| 487 | 487 | ||
| 488 | 488 | _actionSheet = [[SWActionSheet alloc] initWithView:aView]; | |
| 489 | + | ||
| 489 | 490 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)]; | |
| 491 | + tap.delegate = self; | ||
| 490 | 492 | [_actionSheet addGestureRecognizer:tap]; | |
| 491 | 493 | ||
| 492 | 494 | [self presentActionSheet:_actionSheet]; | |
@@ -497,9 +499,6 @@ - (void)configureAndPresentActionSheetForView:(UIView *)aView | |||
| 497 | 499 | [UIView commitAnimations]; | |
| 498 | 500 | } | |
| 499 | 501 | ||
| 500 | - -(void)handleTap:(UIGestureRecognizer*) recognizer{ | ||
| 501 | - [self actionPickerCancel:nil]; | ||
| 502 | - } | ||
| 503 | 502 | - (void) didRotate:(NSNotification *)notification | |
| 504 | 503 | { | |
| 505 | 504 | UIInterfaceOrientationMask supportedInterfaceOrientations = (UIInterfaceOrientationMask) [[UIApplication sharedApplication] | |
@@ -584,6 +583,15 @@ - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverControl | |||
| 584 | 583 | [self notifyTarget:self.target didCancelWithAction:self.cancelAction origin:[self storedOrigin]]; | |
| 585 | 584 | } | |
| 586 | 585 | ||
| 586 | + #pragma mark UIGestureRecognizerDelegate | ||
| 587 | + - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{ | ||
| 588 | + CGPoint location = [gestureRecognizer locationInView:self.toolbar]; | ||
| 589 | + return !CGRectContainsPoint(self.toolbar.bounds, location); | ||
| 590 | + } | ||
| 591 | + | ||
| 592 | + -(void)handleTap:(UIGestureRecognizer*) recognizer{ | ||
| 593 | + [self actionPickerCancel:nil]; | ||
| 594 | + } | ||
| 587 | 595 | ||
| 588 | 596 | @end | |
| 589 | 597 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments