-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
243 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
1F0F989418388E0E000CE764 /* VZCommentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F0F989318388E0E000CE764 /* VZCommentCell.m */; }; | ||
1F0F98971838987C000CE764 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 1F0F98951838987C000CE764 /* [email protected] */; }; | ||
1F0F98981838987C000CE764 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 1F0F98961838987C000CE764 /* [email protected] */; }; | ||
1F49C110188AB05300767851 /* VZFeedbackC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F49C10F188AB05300767851 /* VZFeedbackC.m */; }; | ||
1F4C5C121849B6ED00AB3696 /* VZNavC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4C5C111849B6ED00AB3696 /* VZNavC.m */; }; | ||
1F664F8B182375A500DA43F1 /* VZPostViewC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F664F8A182375A500DA43F1 /* VZPostViewC.m */; }; | ||
1F7721F11812D3680080308A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F7721F01812D3680080308A /* Foundation.framework */; }; | ||
|
@@ -70,6 +71,8 @@ | |
1F0F989318388E0E000CE764 /* VZCommentCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VZCommentCell.m; sourceTree = "<group>"; }; | ||
1F0F98951838987C000CE764 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
1F0F98961838987C000CE764 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
1F49C10E188AB05300767851 /* VZFeedbackC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VZFeedbackC.h; sourceTree = "<group>"; }; | ||
1F49C10F188AB05300767851 /* VZFeedbackC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VZFeedbackC.m; sourceTree = "<group>"; }; | ||
1F4C5C101849B6ED00AB3696 /* VZNavC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VZNavC.h; sourceTree = "<group>"; }; | ||
1F4C5C111849B6ED00AB3696 /* VZNavC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VZNavC.m; sourceTree = "<group>"; }; | ||
1F664F89182375A500DA43F1 /* VZPostViewC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VZPostViewC.h; sourceTree = "<group>"; }; | ||
|
@@ -264,6 +267,8 @@ | |
1F80241018797A80005F4005 /* VZStatusListC.m */, | ||
1F043A14187C18CC00EFA890 /* VZWebViewC.h */, | ||
1F043A15187C18CC00EFA890 /* VZWebViewC.m */, | ||
1F49C10E188AB05300767851 /* VZFeedbackC.h */, | ||
1F49C10F188AB05300767851 /* VZFeedbackC.m */, | ||
); | ||
name = C; | ||
sourceTree = "<group>"; | ||
|
@@ -444,6 +449,7 @@ | |
1F7722241812D7EA0080308A /* VZPostListC.m in Sources */, | ||
1F7722011812D3680080308A /* VZAppDelegate.m in Sources */, | ||
1F7721FD1812D3680080308A /* main.m in Sources */, | ||
1F49C110188AB05300767851 /* VZFeedbackC.m in Sources */, | ||
1FE18C55183C983E009E7938 /* VZStacView.m in Sources */, | ||
1FC0819118252A13005CAFBB /* VZNearC.m in Sources */, | ||
1F94FF58183763C0001114B4 /* VZNavView.m in Sources */, | ||
|
@@ -553,7 +559,7 @@ | |
GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
GCC_PREFIX_HEADER = "VZ/VZ-Prefix.pch"; | ||
INFOPLIST_FILE = "VZ/VZ-Info.plist"; | ||
IPHONEOS_DEPLOYMENT_TARGET = 6.0; | ||
IPHONEOS_DEPLOYMENT_TARGET = 7.0; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
PROVISIONING_PROFILE = "39BACF4F-15FE-4870-AFA4-326464A0FEFF"; | ||
VALID_ARCHS = "armv7 armv7s arm64"; | ||
|
@@ -575,7 +581,7 @@ | |
GCC_PRECOMPILE_PREFIX_HEADER = YES; | ||
GCC_PREFIX_HEADER = "VZ/VZ-Prefix.pch"; | ||
INFOPLIST_FILE = "VZ/VZ-Info.plist"; | ||
IPHONEOS_DEPLOYMENT_TARGET = 6.0; | ||
IPHONEOS_DEPLOYMENT_TARGET = 7.0; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
PROVISIONING_PROFILE = "39BACF4F-15FE-4870-AFA4-326464A0FEFF"; | ||
WRAPPER_EXTENSION = app; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// VZFeedbackC.h | ||
// VZ | ||
// | ||
// Created by Travis on 14-1-18. | ||
// Copyright (c) 2014年 Plumn LLC. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "VZM.h" | ||
@interface VZFeedbackC : UIViewController | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
// | ||
// VZFeedbackC.m | ||
// VZ | ||
// | ||
// Created by Travis on 14-1-18. | ||
// Copyright (c) 2014年 Plumn LLC. All rights reserved. | ||
// | ||
|
||
#import "VZFeedbackC.h" | ||
#import <SIAlertView/SIAlertView.h> | ||
@interface AVAnalyticsUtils : NSObject | ||
|
||
+(NSMutableDictionary *)deviceInfo; | ||
|
||
@end | ||
|
||
@interface VZFeedbackC () | ||
@property(nonatomic,weak) IBOutlet UITextView *textView; | ||
@end | ||
|
||
@implementation VZFeedbackC | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization | ||
} | ||
return self; | ||
} | ||
|
||
-(IBAction)send:(id)a{ | ||
if (self.textView.text.length<6) { | ||
SIAlertView *alertView = [[SIAlertView alloc] initWithTitle:@"提示" andMessage:@"请您再多说几句吧"]; | ||
|
||
[alertView addButtonWithTitle:@"确定" | ||
type:SIAlertViewButtonTypeDefault | ||
handler:^(SIAlertView *alert) { | ||
|
||
}]; | ||
|
||
alertView.transitionStyle = SIAlertViewTransitionStyleDropDown; | ||
|
||
[alertView show]; | ||
}else{ | ||
[self.textView resignFirstResponder]; | ||
self.view.userInteractionEnabled=NO; | ||
|
||
AVObject *fb=[AVObject objectWithClassName:@"Feedback"]; | ||
if ([VZUser currentUser]) { | ||
[fb setObject:[VZUser currentUser] forKey:@"from"]; | ||
} | ||
|
||
[fb setObject:[AVAnalyticsUtils deviceInfo] forKey:@"deviceInfo"]; | ||
|
||
[fb setObject:self.textView.text forKey:@"text"]; | ||
|
||
__weak typeof(self) ws=self; | ||
[fb saveEventually:^(BOOL succeeded, NSError *error) { | ||
ws.view.userInteractionEnabled=YES; | ||
|
||
NSString *title=succeeded?@"发送成功":@"发送失败"; | ||
|
||
NSString *msg=succeeded?@"谢谢您的反馈,这对我们非常重要.":[error.userInfo objectForKey:NSLocalizedDescriptionKey]; | ||
|
||
SIAlertView *alertView = [[SIAlertView alloc] initWithTitle:title andMessage:msg]; | ||
|
||
if (succeeded) { | ||
[alertView addButtonWithTitle:@"确定" | ||
type:SIAlertViewButtonTypeDefault | ||
handler:^(SIAlertView *alert) { | ||
[ws.navigationController popToRootViewControllerAnimated:YES]; | ||
}]; | ||
}else{ | ||
[alertView addButtonWithTitle:@"重试" | ||
type:SIAlertViewButtonTypeDefault | ||
handler:^(SIAlertView *alert) { | ||
[ws send:Nil]; | ||
}]; | ||
[alertView addButtonWithTitle:@"取消" | ||
type:SIAlertViewButtonTypeCancel | ||
handler:^(SIAlertView *alert) { | ||
[ws.navigationController popToRootViewControllerAnimated:YES]; | ||
}]; | ||
|
||
} | ||
|
||
|
||
|
||
alertView.transitionStyle = SIAlertViewTransitionStyleDropDown; | ||
|
||
[alertView show]; | ||
}]; | ||
} | ||
} | ||
|
||
-(void)viewWillAppear:(BOOL)animated{ | ||
[super viewWillAppear:animated]; | ||
[self.textView becomeFirstResponder]; | ||
[AVAnalytics beginLogPageView:@"意见反馈"]; | ||
} | ||
|
||
-(void)viewWillDisappear:(BOOL)animated{ | ||
[super viewWillDisappear:animated]; | ||
[AVAnalytics endLogPageView:@"意见反馈"]; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
self.view.backgroundColor=[UIColor colorWithPatternImage:[VZTheme bgImage]]; | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
/* | ||
#pragma mark - Navigation | ||
// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | ||
{ | ||
// Get the new view controller using [segue destinationViewController]. | ||
// Pass the selected object to the new view controller. | ||
} | ||
*/ | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.