Skip to content

Commit cf0831f

Browse files
committed
iOS7的一些bugfix
1 parent bdc73ec commit cf0831f

5 files changed

Lines changed: 16 additions & 8 deletions

File tree

Coding_iOS/Controllers/AddTopicViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ - (void)addTopicBtnClicked:(id)sender{
8383
self.myProTopic.title = _inputTitleView.text;
8484
self.myProTopic.content = _inputContentView.text;
8585

86-
if (_myProTopic.title.length <= 0 || _myProTopic.content <= 0) {
86+
if (_myProTopic.title.length <= 0 || _myProTopic.htmlMedia.contentOrigional <= 0) {
8787
kTipAlert(@"至少写点什么吖");
8888
return;
8989
}

Coding_iOS/Controllers/MeSetting/FeedbackViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ - (void)feedbackBtnClicked:(id)sender{
9090
self.myProTopic.title = _inputTitleView.text;
9191
self.myProTopic.content = _inputContentView.text;
9292

93-
if (_myProTopic.title.length <= 0 || _myProTopic.content <= 0) {
93+
if (_myProTopic.title.length <= 0 || _myProTopic.htmlMedia.contentOrigional <= 0) {
9494
kTipAlert(@"至少写点什么吖");
9595
return;
9696
}

Coding_iOS/Models/HtmlMedia.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ - (instancetype)initWithString:(NSString *)htmlString showType:(MediaShowType)sh
1717
htmlString = [NSString stringWithFormat:@"<body>%@</body>", htmlString];
1818
}
1919

20-
_contentDisplay = [[NSMutableString alloc] init];
20+
_contentDisplay = [NSMutableString stringWithString:@""];
2121
_mediaItems = [[NSMutableArray alloc] init];
2222

2323
NSData *data=[htmlString dataUsingEncoding:NSUTF8StringEncoding];

Coding_iOS/Models/ProjectTopic.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ - (NSString *)toAddTopicPath{
5656
}
5757
- (NSDictionary *)toAddTopicParams{
5858
return @{@"title" : [_title aliasedString],
59-
@"content" : [_content aliasedString]};
59+
@"content" : [_htmlMedia.contentOrigional aliasedString]};
6060
}
6161

6262
- (NSString *)toCommentsPath{

Coding_iOS/Vendor/ActionSheetPicker/AbstractActionSheetPicker.m

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ CG_INLINE BOOL isIPhone4()
5050

5151

5252

53-
@interface AbstractActionSheetPicker ()
53+
@interface AbstractActionSheetPicker ()<UIGestureRecognizerDelegate>
5454

5555
@property(nonatomic, strong) UIBarButtonItem *barButtonItem;
5656
@property(nonatomic, strong) UIBarButtonItem *doneBarButtonItem;
@@ -486,7 +486,9 @@ - (void)configureAndPresentActionSheetForView:(UIView *)aView
486486
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIApplicationWillChangeStatusBarOrientationNotification object:nil];
487487

488488
_actionSheet = [[SWActionSheet alloc] initWithView:aView];
489+
489490
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
491+
tap.delegate = self;
490492
[_actionSheet addGestureRecognizer:tap];
491493

492494
[self presentActionSheet:_actionSheet];
@@ -497,9 +499,6 @@ - (void)configureAndPresentActionSheetForView:(UIView *)aView
497499
[UIView commitAnimations];
498500
}
499501

500-
-(void)handleTap:(UIGestureRecognizer*) recognizer{
501-
[self actionPickerCancel:nil];
502-
}
503502
- (void) didRotate:(NSNotification *)notification
504503
{
505504
UIInterfaceOrientationMask supportedInterfaceOrientations = (UIInterfaceOrientationMask) [[UIApplication sharedApplication]
@@ -584,6 +583,15 @@ - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverControl
584583
[self notifyTarget:self.target didCancelWithAction:self.cancelAction origin:[self storedOrigin]];
585584
}
586585

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+
}
587595

588596
@end
589597

0 commit comments

Comments
 (0)