These are chat archives for codefellows/sea-c24-iOS-F2

15th
Nov 2014
Scott Kendall
@dskendall
Nov 15 2014 00:12
no. if I try to change it to ViewController, it just resets to a grayed out UITableViewController
one difference I notice between the 2 projects: the one that works says nothing at top of the view controller with the table view, the new one that I'm trying to get to work says Root View Controller at the top
Scott Kendall
@dskendall
Nov 15 2014 00:20
sorry one says View Controller at top (the one that works), the other says Root View Controller (the one that doesn't work)
Kevin Pham
@kpham13
Nov 15 2014 00:20
Is there code/github link we can look at?
Scott Kendall
@dskendall
Nov 15 2014 00:20
ok one sec...
Kevin Pham
@kpham13
Nov 15 2014 00:20
And @bradleypj823 is referring to setting your custom class on Main.storyboard
Scott Kendall
@dskendall
Nov 15 2014 00:24
right, that's what I was trying to do, but it doesn't stick.
code is here: https://github.com/dskendall/cf/tree/master/c-24/c-24%20assignments
one that doesn't let me wire up the IBOutlets is ClassRoster; old one that works is Assignment4
Kevin Pham
@kpham13
Nov 15 2014 00:25
So your class controller file needs to be of the same class of the controller you dragged onto the storyboard
If it's grayed out to UITableViewController, then you might have dragged that instead of UIViewController
"View Controller"
Scott Kendall
@dskendall
Nov 15 2014 00:27
ok, so you mean I dragged the incorrect item out of the lower right corner onto the storyboard?
Kevin Pham
@kpham13
Nov 15 2014 00:29
Yes, I just confirmed it.
Scott Kendall
@dskendall
Nov 15 2014 00:30
ahhh. so to fix, delete that item from the storyboard and put in a standard view controller? I think I had dropped the Navigation Controller.
Kevin Pham
@kpham13
Nov 15 2014 00:30
Yeah
Scott Kendall
@dskendall
Nov 15 2014 00:30
will try thx
bradleypj823
@bradleypj823
Nov 15 2014 00:31
yep, thats gotta be it
Kevin Pham
@kpham13
Nov 15 2014 00:32
Brad wants you to suffer by doing it manually, sorry!
Scott Kendall
@dskendall
Nov 15 2014 00:33
if not using a navigation controller, how add navigation to storyboard?
John Leonard
@cwnidog
Nov 15 2014 00:34
Sorry I came to this so late - I got nailed by something similar a week ago.
Kevin Pham
@kpham13
Nov 15 2014 00:36
on storyboard, click your rootViewController, click "Editor" on the menu bar -> Embed In -> Navigation Controller
Scott Kendall
@dskendall
Nov 15 2014 00:37
easter egg! thx
Kevin Pham
@kpham13
Nov 15 2014 00:38
np
Any other questions, ask me now cause I'm leaving in 10 min haha
John Leonard
@cwnidog
Nov 15 2014 00:41
BTW - just to give a heads-up, I got kicked last night when I got a little out of sync between two machines. I did a git pull to get the more advanced repository’s file into my local repository and it wasn’t able to auto merge. The swift files were easy enough to fix, but the storyboard .xml file just didn’t want to play. Eventually, I just wiped out my local, brought everything in from he more advanced repository and made hand edits.
Scott Kendall
@dskendall
Nov 15 2014 00:44
god... i got the outlet popup, but didn't know what to name, so canceled. now I can't get it again
Kevin Pham
@kpham13
Nov 15 2014 00:44
That's brutal. I've had similar issues. When working on two machines, you'll want to commit+push after finishing your work on one machine. Then pull+merge on the other machine. You'll get out of sync if you don't do it that way. Every time you open the storyboard, the project files related change.
@dskendall what are you trying to outlet?
Scott Kendall
@dskendall
Nov 15 2014 00:47
the ViewController with the table view on it to my ViewController.swift
Kevin Pham
@kpham13
Nov 15 2014 00:47
The ViewController or just the table view?
Scott Kendall
@dskendall
Nov 15 2014 00:47
I was trying to wire up from the storyboard ViewController to my class file ViewController. is that correct?
Kevin Pham
@kpham13
Nov 15 2014 00:48
On storyboard, go to the Identity Inspector on the right side
Top section is Custom Class, Click through the "Class" menu to your ViewController name
I think it'll be "ViewController"
After that, create an IBOutlet of the Table View onto your ViewController class
Scott Kendall
@dskendall
Nov 15 2014 00:51
ok that worked. that was my confusion. i was trying to create an outlet from the overall view controller to the class... not the table view to the class.
John Leonard
@cwnidog
Nov 15 2014 00:51
I thought pull was a combination fetch + merge. I think the problem was that some of my changes were incompatible. I did do a commit + push from the more advanced up to github and then did a pull from the local.
Scott Kendall
@dskendall
Nov 15 2014 00:51
thanks
John Leonard
@cwnidog
Nov 15 2014 00:52
Kevin, that last bit that you listed on the storyboard & View Controller, was just what worked for me last week.
Scott Kendall
@dskendall
Nov 15 2014 00:52
@kpham13 are you a student or TA?
Kevin Pham
@kpham13
Nov 15 2014 00:53
@cwnidog That is correct. You'll have to resolve merge conflicts if it doesn't play nice.
@dskendall I'm the TA that's usually not there lol
I'm actually only there on Mondays
John Leonard
@cwnidog
Nov 15 2014 00:54
Yup, with straight code files, no big deal. With generated files, e.g. the storyboard. it’s sometimes easire said than done.
Scott Kendall
@dskendall
Nov 15 2014 00:54
ahhh hope to meet you next time. thx again.
Kevin Pham
@kpham13
Nov 15 2014 00:55
Storyboard is a pain, but it's so awesome at the same time.
Have a good weekend! I'll be there this Monday, so see y'all there.
Scott Kendall
@dskendall
Nov 15 2014 00:57
waiting to feel the awesome after the pain subsides. have a good one.
John Leonard
@cwnidog
Nov 15 2014 00:58
Yeah, like most things, when it works right, it’s golden. When I ran a SW development team in the ‘90s and IDEs were first coming out, I wouldn’t let my team use them. Not because I was a hardass, but because when things broke, I wanted to know how to fix them. Much easier if you actually wrote the stuff.
Ryan Christensen
@randhyllcho
Nov 15 2014 22:02
I can't figure out how to store the image from the camera to a person. The image shows up in the imageView but if I go back to my tableView and choose the same person the photo has reverted back to the default image.
John Leonard
@cwnidog
Nov 15 2014 22:22
Yup. I think that for now, that’s all we’ve told it to do. Non-volatile memory is on the agenda for next week, IIRC.
Kevin Pham
@kpham13
Nov 15 2014 22:33
Did you create a UIImage property for your Person class? Once you take that picture you need to set that property. Or are you talking about data persistence?
John Leonard
@cwnidog
Nov 15 2014 22:51
I was reading it as persistence.
Ryan Christensen
@randhyllcho
Nov 15 2014 23:03
I created a var image = UIImage? in my person class. I don't know what data persistence means... I'm looking it up now.
John Leonard
@cwnidog
Nov 15 2014 23:48
Randy, persistance mean that data stays when the app is turned off - so when you turn it back on it’s like you never left. In effect, once you set a student’s image, it stays set until you change it. Until the end of time, or you lose your iPhone, whichever comes first. I think it should be var image: UIImage? in your person class declaration, colon instead of equals, you’re just defining, not assigning, in the declaration. The assignment should be in your imagePickerController().