iOS Tutorial: How To Create A Simple iPhone App: Part 1/3

Discussion of the official tutorials published on raywenderlich.com. Please only discuss the official tutorials here - for general questions, use the General Discussion forum instead.

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby xmugen » Thu Mar 15, 2012 12:45 pm

for me get to to work I need to put more lines in
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyBasicCell"];

if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"MyBasicCell"];
}

ScaryBugDoc *bug = [self.bugs objectAtIndex:indexPath.row];
cell.textLabel.text = bug.data.title;
cell.imageView.image = bug.thumbImage;
return cell;
}
xmugen
n00b
 
Posts: 1
Joined: Thu Mar 15, 2012 12:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby br8k » Tue Mar 20, 2012 2:46 pm

Hi
Must say that this tutorial is what I been looking for!! =)=)

I did exactly what the tutorial did except that I made it for iPad.

When running nothing show up, and after some seconds of a black screen, "SIGABRT", duble and trippled check the code, what can possible be wrong??


Xcode 4.2

EDIT

Above problem is still an issue even thou I worked around it! I downloaded the sample-code and run that project,worked! I tried ran it as iPad (I made the app Universal) and it worked fine as well (except the obvious shrinking factor).

What I now want is as follow.
Depending on selected row (= celltitle) different textField's shall be filled in with different numbers e.g
cellTitle == "A" -> textField1 = 1 && textField2 = 2 ; // pseudo code
cellTitle == "B" -> textField10 = 1 && textField2 = 20;// - || -

This kind of problem is usually not an issue, I just put the "IBOutlet textField * textField_x" in the .h file then ctr-drag to the textField in the storyBoard. But I cannot just put it in the top of the detailVC =( so where the heck shall i put the declaration of my textFields? =)
Maybe there is something in the sample code that prevent me from doing right / as I use to
br8k
n00b
 
Posts: 2
Joined: Tue Mar 20, 2012 2:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby br8k » Fri Mar 30, 2012 4:09 pm

Hey

First I will say the previous problem (post above) is now fixed =)

My new problem is how to use ScaryBugs in a much bigger sense, such as adding it to an other project, incl other views.
So the problem is that the line:
(UINavigationController *) self.window.rootViewController;
I think (pls correct me if I'm wrong) that since the "initial view" no longer is the same in my project, the rootViewController does not refer / points to the correct View, which I think is why My tableView hos no rows.

It sated in the tutorial "Speaking of which, we can get a pointer to the RootViewController since we know it’s the first view controller in the navigation controller’s stack. There are other ways we could have gotten a pointer as well, but this is one easy way." What are the other ways? But most important of all, is this why I cannot change the "initial view" in my storyboard
br8k
n00b
 
Posts: 2
Joined: Tue Mar 20, 2012 2:36 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby rainman22 » Mon Apr 09, 2012 9:08 am

Hi - sorry for asking, but where can I find the version of this post that is targeted at Xcode 3?
I have Snow Leopard and use Xcode 3.2.6 and like to use your tutorial.
Thanks
rainman22
n00b
 
Posts: 1
Joined: Mon Apr 09, 2012 9:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby srolfe » Thu Apr 12, 2012 3:13 pm

Ray,

Thanks for the tutorial.

When I finished it and ran the app I get the 4 bugs listed 4 times i.e. 16 items now in the list. I downloaded your completed version and get the same thing. Is this what's supposed to happen?

Thanks

Stewart
srolfe
n00b
 
Posts: 1
Joined: Thu Apr 12, 2012 3:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby jamieedwards » Sat Apr 14, 2012 9:13 pm

After I create the Master-Detail project, I click "Run" as you suggested, and when I do, my app doesn't look like what your image looks like. Mine has an "Edit" button on the top left, and a "+" button on the right, in the middle it says "Master". What did I do wrong? This is the exact type of app that I am looking to learn how to build, so I am hoping that I can get it to work.

Also, when I download the sample project, and run it, I see the title at the top, and the four bugs, but when I click on any of the bugs, nothing happens. Also in the Xcode editor, I get an error saying "Unsupported Configuration" "Scene is unreachable due to lack of entry points and does not have an identifier for runtime access via - instantiateViewControllerWithIdentifier:."

I am brand new to Xcode and am really wanting to learn how to make an app. I am using the most up to date version Xcode 4.3.2

Thanks,
Jamie
jamieedwards
n00b
 
Posts: 1
Joined: Sat Apr 14, 2012 9:11 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby benoitstjean » Mon Apr 23, 2012 7:30 pm

I am new to Xcode programming and everything that surrounds iOS programming. I've been successful in the past in reproducing tutorials found online. So after a few months working on other stuff, I decided today to get back into it. I was following the Scary Bugs tutorial and right off the bat, the sample doesn't work for me. From the get go, I don't have the + symbol in the upper-right corner therefore I can't go into the Details page although I've followed the steps as they are written. I am using a MacBook Pro, I have Lion and Xcode 4. Here are the details:

Version: 4.2 (4D199)
Location: /Developer
Applications:
Xcode: 4.2 (828)
Instruments: 4.2 (4233)
Dashcode: 3.0.2 (336)
SDKs:
Mac OS X:
10.6: (10K549)
10.7: (11C63)
iPhone OS:
5.0: (9A334)
iPhone Simulator:
4.3: (8H7)
5.0: (9A334)

So, where did I do something wrong? As I said, I've read the tutorial from the beginning and I don't have the same thing that I see in the tutorial. When I click the RUN button, it's just a blank list that says "Scary bugs" at the top.

Thanks,


[UPDATE 2012/04/24 @ 8:19AM EST]

So is it possible that the tutorial has steps missing? Not only does the first part of the tutorial is not functional but some items are missing. For the '+' button, I had to add a "Bar Button Item". Then, to make this button pop the Detail View Controller, I had to add a 'segue' by right-clicking the bar button item, then I added a dot in the PUSH option of the "Story Board Segue", then dragged the line to the Detail View Controller. Then, if I hit the RUN button, the app pops-up. The '+' button actually says "Item" but then, as much as I see the Detail View Controller, there's not much more happening. The title of the detail view controller is "Detail" and then there's a back button that says "Scary bugs" and that's about it. What am I doing wrong?
benoitstjean
n00b
 
Posts: 1
Joined: Mon Apr 23, 2012 7:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby renanmzmendes » Fri Apr 27, 2012 3:01 pm

Hi,

I have Snow Leopard installed on my Mac. Does this mean I cannot code for iOS 5? Does only XCode 4.1 (and beyond) provide support for this iOS version?
renanmzmendes
n00b
 
Posts: 1
Joined: Fri Apr 27, 2012 2:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby rcasey » Fri Apr 27, 2012 5:34 pm

@benoitstjean

Regarding a blank screen: Does your view controller class have a loadView method in it? If so, simply remove that method.

Certain versions of XCode insert that method with it NOT being commented out.

If you are using XIBs or the storyboard, the loadView method should be removed.

Hope this helps!
Richard
rcasey
Team Member
Forum Subject Matter Expert
 
Posts: 1220
Joined: Fri Jul 01, 2011 6:50 pm
Has thanked: 2 times
Been thanked: 263 times

Re: How To Create A Simple iPhone App on iOS 5 Tutorial: Par

Postby Shinobijimbo » Tue May 01, 2012 3:36 pm

Hey, first, great tutorial... and I will confess to not knowing enough C, so likely this is the root problem. But, I have been given 1 error:

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254

Does this mean anything to you without more info?

Thanks, Jim
Shinobijimbo
n00b
 
Posts: 1
Joined: Tue May 01, 2012 3:33 pm
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Official Tutorials

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests