0

So when I originally designed this view I did not take into account a desire to make changes later down the road...

Here my design...

enter image description here

And the the .h file...

#import <UIKit/UIKit.h>
@interface RegisterView : UITableViewController <UITextFieldDelegate>
@end

What I want to do is create a view and place all of the elements that I already have inside of it... Is there a way that I can accomplish this, but not have to essentially re-write the entire .m file? Its around 400 lines, nothing tough but very laborious. Thoughts?

Travis Tubbs
  • 827
  • 1
  • 14
  • 32
  • You can change your `UITableViewController` to `UIViewController` in the .m file, and then manually edit the storyboard file to represent the layout you want. See [this answer](http://stackoverflow.com/a/22918268/1445366) for an example, although that answer is moving in the opposite direction. Make sure your storyboard is under source control or you have a backup; they're finicky. – Aaron Brager Mar 23 '16 at 16:08
  • Another alternative would be to make a regular `UIViewController` and then embed this one as a child view controller. – Aaron Brager Mar 23 '16 at 16:09
  • ^ this is what I would prefer to do, but won't I have to change a lot of my .m file? – Travis Tubbs Mar 23 '16 at 18:03
  • Why would you? Have you tried it? And which choice is "this"? – Aaron Brager Mar 23 '16 at 20:37
  • I tried to create a view in my .xib folder and place these(in the picture above) inside the view. Then I went into my .h folder and changed the UITableViewController to UIViewController, but it just kept giving me a blank screen. Im still too new at xcode to completely understand everything going on with th .xib files – Travis Tubbs Mar 23 '16 at 20:39
  • You have to manually edit the xib file as text. See the answer I linked to in my first comment. – Aaron Brager Mar 23 '16 at 20:43

0 Answers0