Last active
December 25, 2015 18:49
-
-
Save Omnipresent/7023086 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class FormController < Formotion::FormController | |
include BW::KVO | |
def initWithSomething | |
puts "came ere" | |
@form = Formotion::Form.new({ | |
title: "", | |
sections: [ | |
{ | |
rows: [ { | |
title: "Project Name", | |
key: :name, | |
placeholder: "project name..", | |
type: :string, | |
}] | |
}, | |
{ | |
title: "Some title", | |
key: :some_type, | |
select_one: true, | |
footer: "Some footer", | |
rows: [{ | |
title: "Test1", | |
key: :test1, | |
type: :check, | |
value: true | |
}, { | |
title: "Test2", | |
key: :test2, | |
type: :check, | |
}, { | |
title: "Test3", | |
key: :test3, | |
type: :check, | |
}] | |
}, | |
]#ends section | |
})#ends new | |
self.initWithForm(form) | |
self | |
end | |
def submit | |
data = @form.submit | |
end | |
def viewDidLoad | |
super | |
self.title = "app name" | |
end | |
end |
This file contains hidden or 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
class FormController < Formotion::FormController | |
include BW::KVO | |
def initWithSomething | |
puts "came ere" | |
@form = Formotion::Form.new({ | |
title: "", | |
sections: [ | |
{ | |
rows: [ { | |
title: "Project Name", | |
key: :name, | |
placeholder: "project name..", | |
type: :string, | |
}] | |
}, | |
{ | |
title: "Some title", | |
key: :some_type, | |
select_one: true, | |
footer: "Some footer", | |
rows: [{ | |
title: "Test1", | |
key: :test1, | |
type: :check, | |
value: true | |
}, { | |
title: "Test2", | |
key: :test2, | |
type: :check, | |
}, { | |
title: "Test3", | |
key: :test3, | |
type: :check, | |
}] | |
}, | |
]#ends section | |
})#ends new | |
self.initWithForm(form) | |
self | |
end | |
def submit | |
data = @form.submit | |
end | |
def viewDidLoad | |
super | |
self.title = "App name" | |
end | |
end |
This file contains hidden or 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
def moveToChildView (sender) | |
self.parentViewController.pushViewController(FormController.alloc.initWithSomething, animated:true) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment