Re: Error In An App I'm making From A Tutorial I found
Re: Error In An App I'm making From A Tutorial I found
- Subject: Re: Error In An App I'm making From A Tutorial I found
- From: Alex Zavatone <email@hidden>
- Date: Wed, 17 Apr 2013 11:04:00 -0400
One thing is that your Quote Button isn't hooked up to the button in the storyboard. You need to wire it up/connect it to your your quoteButtonTapped method. Since you're visually impaired, I don't know an easy way to do this if you can't see the screen.
For the button, I've clicked in the Alignment Inspector and set the alignment of the text to Horizontal middle and Vertical middle, so that the text appears in the middle.
So, when trying to get your random number, your % sign is in the wrong place.
Try this:
int index = arc4random() % array_tot ;
You were putting it inside the function and it needs to be after.
Now, since this runs, your next line works fine, but in self.quoteText.text, nothing will update since the quoteText IBOutlet is not wired up to the storyboard. Again, a hard thing to do if you can't see the screen.
If you still need pointers, I'll be available in 1 hour (noon EST) to email offlist.
Cheers. I can see the progress.
One thought I have though, since storyboards are visual, are storyboarding the apps really the best way to go for you since they require so much visual identification? This can be done in code and may be a boatload easier. Hell, I can see just fine and had the damnedest time just figuring out how Xcode wanted humans to hook up the storyboard controls to the IBOutlets and IBActions.
On Apr 17, 2013, at 9:48 AM, Harmony Neil wrote:
> Hellow,
> I've been looking at a tutorial for objective c and xcode from http://www.raywenderlich.com/21320/objectively-speaking-a-crash-course-in-objective-c-ios6
> and I've fixed most of the errors. Anyway, I've only got 1 error left which I can't work out how to fix. Would anyone be able to tell me where I'm going wrong? I've put a dropbox link to my xcode project below.
> https://dl.dropboxusercontent.com/u/4231099/QuoteGen.zip
> Thanks,
> Harmony.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden