Skip to content

Instantly share code, notes, and snippets.

@Omnipresent
Last active December 25, 2015 18:49
Show Gist options
  • Save Omnipresent/7023086 to your computer and use it in GitHub Desktop.
Save Omnipresent/7023086 to your computer and use it in GitHub Desktop.
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
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
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