Fall 2011-Psychologist Demo self.title is nil?

123 views
Skip to first unread message

piratemc74

unread,
Feb 11, 2012, 10:38:43 AM2/11/12
to iPhone Application Development Auditors
Hi everyone, this is driving me crazy. I entered the code to convert
Psychologist to an iPhone app, along with the lecture, and everything
works, except the "Title" of the RotatableViewController, appears to
be nil. I noticed this, by the "willHideViewController" method, which
is where we add the button to the toolBar. When it displays, it has no
title. Setting a breakpoint, I see "self", which is the
RotatableViewController, has no title. It's nil.

I'm sure it's something I've missed, but, I've been through the demo
rechecking code, multiple times, and can't find it.

By the way, in the awakeFromNib method, in RotateableViewController, I
set a breakpoint there, and it's nil there too.

Did I miss something in setting up the StoryBoard? Thanks a ton!

piratemc74

unread,
Feb 11, 2012, 10:40:09 AM2/11/12
to iPhone Application Development Auditors
Duh! I meant, I entered the code to convert it to an IPAD app....
thanks.

8vius

unread,
Feb 12, 2012, 3:09:13 PM2/12/12
to iphone-appd...@googlegroups.com
Did you set the title in the storyboard on the NavCon bar? or are you trying to set it in code?

Luis Miguel Delgado
Tlf: 0412-9902142

My profiles: Facebook Twitter
Contact me: Google Talk lmd...@gmail.com


--
You received this message because you are subscribed to the Google Groups "iPhone Application Development Auditors" group.
To post to this group, send email to iphone-appd...@googlegroups.com.
To unsubscribe from this group, send email to iphone-appdev-aud...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphone-appdev-auditors?hl=en.


piratemc74

unread,
Feb 13, 2012, 7:27:32 AM2/13/12
to iPhone Application Development Auditors
Hi - Stoyboard is updated the way it is supposed to be, with the
titles changes, where they should be. This is the method that is
supposed to put the title into the detail view.

-(void) splitViewController:(UISplitViewController *)svc
willHideViewController:(UIViewController *)aViewController
withBarButtonItem:(UIBarButtonItem *)barButtonItem
forPopoverController:(UIPopoverController *)pc
{
barButtonItem.title = self.title;

[self splitViewBarButtonItemPresenter].splitViewBarButtonItem =
barButtonItem;
}

For some reason, at this point, self.title is nil. This is the the
file, RotatableViewController, from the fall 2011 CS193P class.
Lecture 7, thanks.

On Feb 12, 3:09 pm, 8vius <lmd...@gmail.com> wrote:
> Did you set the title in the storyboard on the NavCon bar? or are you
> trying to set it in code?
>
> Luis Miguel Delgado
> Tlf: 0412-9902142
>
> My profiles: [image: Facebook]
> <http://www.facebook.com/home.php?#!/8vius> [image:
> Twitter] <http://twitter.com/8vius>
> Contact me: [image: Google Talk] lmd...@gmail.com
>  Get a signature like this.
> <http://r1.wisestamp.com/r/landing?promo=19&dest=http%3A%2F%2Fwww.wise...>
> CLICK
> HERE.<http://r1.wisestamp.com/r/landing?promo=19&dest=http%3A%2F%2Fwww.wise...>

sunny

unread,
Apr 26, 2012, 5:36:30 PM4/26/12
to iphone-appd...@googlegroups.com
I'm facing the exact same issue.  Did you figure this out?
> > iphone-appdev-auditors@googlegroups.com.
> > To unsubscribe from this group, send email to
> > iphone-appdev-auditors+unsub...@googlegroups.com.

David Barton

unread,
Apr 27, 2012, 8:45:09 AM4/27/12
to iphone-appd...@googlegroups.com
Hi - I downloaded "Psychologist with Dr Pill.zip" and opened this up. This seems to work ok .. for me anyway. Might be worth cross-referencing with this...

Sunil Varghese

unread,
Apr 30, 2012, 1:28:02 PM4/30/12
to iphone-appd...@googlegroups.com
Thanks for the response.  I've reverted back to my code on Psychologist with Dr Pill.zip and it too has this issue.  I tried hardcoding the title through gdb and it still wouldn't take it in the UI.  It seems to behave like there is a weak pointer instead of a strong one. 

To view this discussion on the web visit https://groups.google.com/d/msg/iphone-appdev-auditors/-/KF6b0_llxEkJ.

To post to this group, send email to iphone-appd...@googlegroups.com.
To unsubscribe from this group, send email to iphone-appdev-aud...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages