|
pokeyman posted:Perhaps you are looking for child windows? That was it, awesome.
|
# ? Oct 13, 2011 19:28 |
|
|
# ? May 15, 2024 02:16 |
|
lord funk posted:Holy poo poo, thank you. I enabled NSZombieEnabled as an environment variable instead, and it points to exactly what was called. Feel even dumber maybe! Mac OS X Debugging Magic iOS Debugging Magic
|
# ? Oct 14, 2011 07:22 |
|
pokeyman posted:Feel even dumber maybe! at the top note: Apple posted:If you're developing for iOS, you should look through this list to see if you're missing out on something that will make your life easier. Yep, nailed it right there.
|
# ? Oct 14, 2011 15:24 |
|
Sulk posted:I've been working my way through Programming in Objective-C and it's been mostly understandable so far, but I've been trying to keep pushing through the book even if I don't completely understand something. I figure that over time I'll see enough uses of various things that it'll become ingrained in my head, much like actual languages. Does that make sense? Also, what is a good book to pick up for iOS development itself? There's one I saw by the same publisher which has a new edition coming out next month, but if anyone has any suggestions it'd be appreciated. Not a book, but if you search iTunes for "Stanford iOS" its got their whole iOS development course. Printed materials are here: http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2010-fall I'm a couple weeks in and its been pretty awesome so far.
|
# ? Oct 14, 2011 23:00 |
|
Sales and Trends, and Financial Reports never sync for me. Sales and Trends tells me I had 950 "paid apps" in fiscal September. I checked, and yep, that counts only type 1 sales, and less than 10 promo codes. Type 7's are not included in your daily "paid apps" figure. Type 7's being the apps that are already owned being redownloaded or loaded onto another device. But on my September financial report, which is all finished now, I have only 651 "Total Units Sold". I am contacting them now, but fully expect a vague response.
|
# ? Oct 15, 2011 14:09 |
|
Funso Banjo posted:Sales and Trends, and Financial Reports never sync for me. Are you certain that you've received reports from all markets? Granted, I wouldn't expect it to be off by 300, but my September financial reports have been trickling in over the past two weeks instead of all at once like they usually do.
|
# ? Oct 15, 2011 16:54 |
|
I'm trying to pick up programming as a hobby again and I've run into something that has confused me. Searching Google and Youtube has not yielded anything yet which is only piling on the frustration. I'm extra frustrated because I swear I saw a Youtube video eight months ago that addressed this exact thing. So my problem right now is trying to understand why when I make a UIScrollView an instance variable to a ViewController class I cannot seem to add it as a subview to the ViewController's view. However, when I just create the object during runtime in the view did load method of the ViewController and go to add it as a subview to the view it works just fine.code:
code:
I don't know why I can't use an instance variable to define the objects that I want to be located in my view. Or I don't know what I'm doing wrong to make it not work right. Could anyone please shed some light on this?
|
# ? Oct 18, 2011 14:24 |
|
I think in that first one you want to be using [self scrollview] (or self.scrollview) to hit your property, the way you're doing it you're accessing the instance variable directly. disclaimer:I'm new to IoS dev also so I may just be blowing out of my rear end here.
|
# ? Oct 18, 2011 15:08 |
|
Who would've guessed that iOS 5 would randomly break certain dead simple features in two of my apps? Certainly not me! I mean, I guess I should've been testing everything with iOS 5 when it was in beta, but shouldn't a little more emphasis be put on maintaining backward compatibility, Apple? If my combination of SQLite database and TableViewController breaks (for some reason, it doesn't break completely either; only one view doesn't work), God knows what might be happening with other apps that do something, ya know, remotely complex.
|
# ? Oct 18, 2011 16:22 |
|
code:
You need to allocate memory for your object before you can initialize it, even if it's an instance variable. So do what you already did in your next example: code:
|
# ? Oct 18, 2011 17:15 |
|
I'm in the habit of doing something like this:code:
code:
|
# ? Oct 18, 2011 17:23 |
|
lord funk posted:I'm in the habit of doing something like this: Won't the compiler complain about you declaring a local variable when you declared it as an instance variable?
|
# ? Oct 18, 2011 17:47 |
|
OHIO posted:Won't the compiler complain about you declaring a local variable when you declared it as an instance variable? It does complain at me when I tried that. I'm not at home right now so I'll have to wait about nine hours to fix it, but I think that what I should be doing is just deleting the instancing of scrollView in the method viewDidLoad so it will look like: scrollView = [[UIScrollView alloc] init... The reason I'm making an instance variable of it is so any other methods in the ViewController class will be able to access it if they need to. I'm trying to make a budget app, and I've made the decision to program as much of the view as I'm able to to minimize the use of the interface builder as much as I can. Since I'm programming the view I've been led to believe it's good to have the buttons, views, labels, etc. as instance variables of the view so all methods can interact with them. Say you type in one number in a text field and I want it to change a view. Wouldnt that method have to be able to effect the views? I hope what I'm trying to say kind of makes sense.
|
# ? Oct 18, 2011 18:32 |
|
Yeah, sorry. It should only becode:
|
# ? Oct 18, 2011 22:26 |
|
In case anyone is having trouble with bugs after the iOS 5 upgrade (yes, I'm probably the only lazy jerk that didn't download the iOS 5 beta), both of the problems I've encountered have been related to the order in which methods are called during startup. God knows why they worked on iOS 3 and 4 after I had a careful look at things, but they did, and now they don't.
|
# ? Oct 19, 2011 03:33 |
|
According to the BNR book, the initializer chain says that when you designate an initializer (which I'll call initWithCustomStuff: for this example), you do all your init stuff in there and then just point the regular init method at it, like so:code:
code:
stray fucked around with this message at 04:00 on Oct 19, 2011 |
# ? Oct 19, 2011 03:55 |
|
stray posted:According to the BNR book, the initializer chain says that when you designate an initializer (which I'll call initWithCustomStuff: for this example), you do all your init stuff in there and then just point the regular init method at it, like so: Just to clarify, you override the superclass's designated initializer and point that to your designated initializer. (Though overriding -init as well might not be a bad idea.) quote:Is there a way to get the everyday init method to pass a non-predetermined argument (cf. boners) on to initWithCustomStuff: this? Well, instance variables are out as you're not yet initialized. So you're pretty much stuck with something predetermined (i.e. known at compile-time) or some global variable. Typically you'll pass in nil or some useful default value. If for whatever reason your class simply won't work when initialized with -init, throw an exception.
|
# ? Oct 19, 2011 07:25 |
I need some serious help because I don't think this is (at least mostly) my fault. I just got the Big Nerd Ranch book for iOS programming and I'm having issues from the get go. The problems probably stem from the fact that I'm using Xcode 4.2, but I'm wondering if there are simply some core changes that I need to be aware of that will contradict what the book is having me do (and simply do new correct things when need be). The first chapter has you make a simple question and answer application, and it seems as if the way things are linked is off. It would help if someone is familiar with the book and could visually see their examples, but the touch event is treated by default as "Touch Up Inside" now, and there aren't Outlets listed in the connections panel. I also had to add the Quiz App Delegate object manually so it could even find the showQuestion/showAnswer methods I'd defined in the delegate. I'm currently getting EXE_BAD_ACCESS errors and I'm not sure of how to change these things around to get the program working correctly. Maybe I'm better off just returning the book and waiting for a new book to come out which supports the new version of Xcode? If the whole thing would be an exercise in frustration otherwise, I'm sure it'd be the logical thing to do. In the meantime I'll keep screwing around with it if I can and maybe I just did something dumb, but it's frustrating that Apple seemingly makes such dramatic changes between versions.
|
|
# ? Oct 21, 2011 23:29 |
|
Sulk posted:I just got the Big Nerd Ranch book for iOS programming and I'm having issues from the get go. The problems probably stem from the fact that I'm using Xcode 4.2 This looks promising though: http://www.youtube.com/watch?v=sROdA4w4x9Y
|
# ? Oct 22, 2011 00:45 |
Cylon Dinner Party posted:I'm in the same boat. I'll probably just go home for the weekend and try again on Monday. Looking at/following the video, there's no "Outlet"/"delegate" anywhere to be found, which is basically the same problem I had before. I don't know what the issue is or what I'm doing wrong, but it's really frustrating.
|
|
# ? Oct 22, 2011 02:30 |
|
Interface Builder is a little different than in 3.x, which is what the book is written for. It's not way huge different, though. IMO most of the differences are just from the transition to one window instead of several. The object library is still over there on the right, the inspector (or whatever it used to be called) is in the top right, etc. Of course, I'm in the middle of a project and so haven't looked at Xcode 4.2, so maybe it is really different than Xcode 4.1. (Gonna transition my app over to 4.2 this weekend) Doc Block fucked around with this message at 03:45 on Oct 22, 2011 |
# ? Oct 22, 2011 03:28 |
|
What really bothers me is not knowing when a random blog post or article about Xcode is for 3 or 4. I tried (and failed) to get an ad hoc build for a beta tester, but I was piecing together different articles that were spanned 4 years apart.
|
# ? Oct 22, 2011 13:48 |
|
PT6A posted:In case anyone is having trouble with bugs after the iOS 5 upgrade (yes, I'm probably the only lazy jerk that didn't download the iOS 5 beta), both of the problems I've encountered have been related to the order in which methods are called during startup. God knows why they worked on iOS 3 and 4 after I had a careful look at things, but they did, and now they don't. One thing I noticed is that if you have a viewController's view as a subview, it now automatically calls viewWillDisappear, viewWillAppear &c. rather than you having to manually do it in the parent view controller.
|
# ? Oct 22, 2011 14:03 |
Doc Block posted:Interface Builder is a little different than in 3.x, which is what the book is written for. I thought it was written for 4.1 as it was published not more than a few months ago..?
|
|
# ? Oct 22, 2011 16:08 |
|
lord funk posted:What really bothers me is not knowing when a random blog post or article about Xcode is for 3 or 4. I tried (and failed) to get an ad hoc build for a beta tester, but I was piecing together different articles that were spanned 4 years apart. Yeah, most posts give it away somehow (either explicitly, or via screenshots, or by you following the directions and heading down a cul-de-sac because the setting moved in this version), but it can be an hour later that you realize the version difference. As for ad hoc builds and beta testing, here's a quick how to for Xcode 3 and Xcode 4, and then hit up the site I got those from to make your beta testing life easier.
|
# ? Oct 22, 2011 16:21 |
|
Sulk posted:Looking at/following the video, there's no "Outlet"/"delegate" anywhere to be found, which is basically the same problem I had before. I don't know what the issue is or what I'm doing wrong, but it's really frustrating. stray fucked around with this message at 18:33 on Oct 22, 2011 |
# ? Oct 22, 2011 18:24 |
stray posted:Xcode 4.2 made some pretty big changes to the project templates and that update only came out in the last week or so. They're working on a third edition and there's a thread in the BNR forums that talks about this. That's a great solution and at least the changes only affected the first few chapters, so Conway said. I won't be around until tomorrow to try it out, but I look forward to being able to, well, actually move forward with the text.
|
|
# ? Oct 22, 2011 18:52 |
|
lord funk posted:What really bothers me is not knowing when a random blog post or article about Xcode is for 3 or 4. I tried (and failed) to get an ad hoc build for a beta tester, but I was piecing together different articles that were spanned 4 years apart. The ad-hoc thing confused the poo poo out of me in xcode 4. From memory you need to basically get a new build config up for adhoc (Uh, just replicate the release one, and set it up for the right signing poo poo), then you archive it, then go to organizer and click send. Apple need to seriously resist the urge to engage in magic though with this. The fact you cant select the build config makes me nervous as hell (What if I want *two* adhoc builds, one for internal testers, the other for beta testers, with different signing profiles? Or how about different build configs with various compiler flags. I dont know how to do that, and creating new targets is just fiddly as gently caress.) e: Oh yeah and the whole not being able to set the base SDK to a 3.x one is pretty scary since I dont have a 3.x phone to test it, but every contract ever will ask for it. duck monster fucked around with this message at 03:58 on Oct 23, 2011 |
# ? Oct 23, 2011 03:56 |
|
By the way. I've had upwards of 50 apps for various different dev contracts up on the store, but I havent once used a UINavigationController till the other day, when chasing some whacky issues with callbacks on UIViews that had been released just drove me so far up the wall I started hunting for alternatives. I had just assumed it had to be used with listviews and required the bar. Nope. And dear god are they easy to use. I wish I had explored this 2 years ago. I'm going to use these for loving everything now. The problems just ~=mAgIc=~ away.
|
# ? Oct 23, 2011 04:00 |
|
Out of curiosity, what sort of techniques were you using before?
|
# ? Oct 23, 2011 05:40 |
|
I hope I don't get run out of this thread for asking this but is there a way to rebind Xcode shortcuts to better match those in VS2010 (particularly the debugging related stuff)?
|
# ? Oct 23, 2011 15:51 |
|
duck monster posted:The ad-hoc thing confused the poo poo out of me in xcode 4. From memory you need to basically get a new build config up for adhoc (Uh, just replicate the release one, and set it up for the right signing poo poo), then you archive it, then go to organizer and click send. Create a "scheme" in the Scheme menu at the upper-left part of the window. This will allow you to create a different build configuration as before in the 'Edit Scheme' window. I think it might also be used to select a separate target.
|
# ? Oct 23, 2011 17:27 |
|
shodanjr_gr posted:I hope I don't get run out of this thread for asking this but is there a way to rebind Xcode shortcuts to better match those in VS2010 (particularly the debugging related stuff)? You'll certainly not get run out of here for dumping on Xcode! You're looking for Xcode menu > Preferences > Key Bindings tab, filter by 'debug' or whatever.
|
# ? Oct 23, 2011 17:56 |
|
Hey speaking of debug: I was working on a little commandline app to do some file processing the other day, and I was NSLog-ging some output. Whenever I hit cmd-R to run the app it was like 50/50 whether the debugger/output window would stay open after it finished. Is there any rhyme or reason when that little window stays open? It was quite annoying having to mouse up to the top of the screen to open that window after the tool quit a good half of the time. I hope I didn't just ask the stupidest question in the book, but it's got me stumped. I don't use xcode that often these days so --
|
# ? Oct 23, 2011 18:11 |
So I'm working on examples again in the book and I've come across an odd issue which I can't entirely figure out. The book has me type out the following as part of a class method: +(id)randomPossession {     //create an array of three adjectives     NSArray *randomAdjectiveList = [NSArray arrayWithObjects:@"Fluffy", "Rusty", "Shiny", nil];     //create an array of three nouns     NSArray *randomNounList = [NSArray arrayWithObjects:@"Bear", "Spork", "Mac", nil]; but for those two arrays, I get the EXC_BAD_ACCESS issue at runtime, and the analyzer seems to point to them as the problem, saying "Argument to 'NSArray' method 'arrayWithObjects:' should be an Objective-C pointer type, not 'char *'. It's late, which isn't helping, but I'm stumped. Any ideas? (This is kind of similar to stuff I've done before in the other book, but at least this way I'm getting a much better understanding of why things are (not) happening.)
|
|
# ? Oct 24, 2011 08:28 |
|
You forgot the @ in front of the strings. +(id)randomPossession { //create an array of three adjectives NSArray *randomAdjectiveList = [NSArray arrayWithObjects:@"Fluffy", @"Rusty", @"Shiny", nil]; //create an array of three nouns NSArray *randomNounList = [NSArray arrayWithObjects:@"Bear", @"Spork", @"Mac", nil]; ... } "" is a char* (C) string, @"" is an (Objective-C) NSString, and NSArray only handles Objective-C objects.
|
# ? Oct 24, 2011 08:52 |
Whoops, I'm dumb. Edit: It's giving me other troubles now, but just some missing info which is probably my fault somehow. At least it's running otherwise. double sulk fucked around with this message at 08:59 on Oct 24, 2011 |
|
# ? Oct 24, 2011 08:55 |
|
I have a question about breakpoint debugging in Xcode: how do you deal with it taking you through all the assembler code? Is there a way to disable that? I've had it happen frequently enough that it makes breakpoint debugging more difficult than other methods, and certainly more difficult than in other languages.
|
# ? Oct 24, 2011 17:29 |
|
Pretty sure that happens when and only when the source for the function it's stepping through is unavailable (e.g. Apple frameworks), or obviously if the function itself is written in assembler (e.g. objc_msgSend). Does the breakpoint jump directly to some assembler, or are you stepping into function calls to reach it? If the latter, just step back out and then step over. If the former (e.g. maybe it's an exception breakpoint and objc_msgSend is at the top of the call stack), find the frames of the call stack with your code and look through that.
|
# ? Oct 24, 2011 19:58 |
|
|
# ? May 15, 2024 02:16 |
|
So i'm just starting to explorer the idea of developing an iPhone game. I'm looking to start by using some sort of pre-made 2d game engine with physics. Is cocos2d still my best bet? Should I be using the unstable 2.0 branch?
|
# ? Oct 25, 2011 01:50 |