我有一个我在Xcode 5中构建的应用程序,它使用FXForms显示三个文本输入。在切换到Xcode 6后,我现在得到六个字段,最后三个标记为Hash,Description和Debug Description。
// SGESettingsForm.h
#import <Foundation/Foundation.h>
#import "FXForms.h"
@interface SGESettingsForm : NSObject <FXForm>
@property (nonatomic, copy) NSString *baseURI;
@property (nonatomic, copy) NSString *apiKey;
@property (nonatomic, copy) NSString *apiSecret;
@end
只有一个视图与表单
交互@implementation SGESettingsViewController
- (id)init
{
self = [super init];
if (self)
{
self.form = [[SGESettingsForm alloc] init];
}
return self;
}
- (void)awakeFromNib
{
// setup form
self.form = self.formController.form = [[SGESettingsForm alloc] init];
self.form.baseURI = [SGESettingsStore baseURI];
self.form.apiKey = [SGESettingsStore apiKey];
self.form.apiSecret = [SGESettingsStore apiSecret];
// if no settings show alert with API instructions
if (![SGESettingsStore isSettingsValid]) {
[self showInstructions];
}
}
- (IBAction)dismiss:(id)sender
{
// resign first responder, fxform fields do not set their data bound values until you click out of them,
// this will set them on clicking the 'Done' button
[self.view endEditing:YES];
// save settings
[SGESettingsStore baseURI:self.form.baseURI
apiKey:self.form.apiKey
apiSecret:self.form.apiSecret];
// if valid settings exit to log view otherwise show instructions
if ([SGESettingsStore isSettingsValid]) {
[self.presentingViewController dismissViewControllerAnimated:YES
completion:NULL];
} else {
[self showInstructions];
}
}
//...
谢谢!
答案 0 :(得分:0)
正如@ Erik的评论所提到的,如果您使用CocoaPods,可以在FXForms的测试版中修复此问题,您可以像这样添加
pod 'FXForms', :git => 'https://github.com/nicklockwood/FXForms.git'