|
wellwhoopdedooo posted:I don't think that's possible. http://stackoverflow.com/questions/2703936/nsdictionary-nsarray-nsset-and-efficiency/2705313#2705313
|
# ¿ Apr 26, 2011 22:26 |
|
|
# ¿ May 5, 2024 19:51 |
|
samiamwork posted:So I'm an idiot and created an app in iTunes Connect with the wrong App ID. I deleted it before I submitted anything but still it looks like the app name is gone forever. Is this really true? I've got an email out to the only iTunes Connect info I could find but maybe someone here has info. This seems really stupid. It's gone. But who cares? it's an app id, nobody sees it anyway.
|
# ¿ May 15, 2011 15:48 |
|
Small White Dragon posted:Had a discussion with another developer and now I'm curious. Yes, what do you mean by cleanup? nil your subview properties in viewDidUnload and in dealloc.
|
# ¿ May 23, 2011 10:42 |
|
pokeyman posted:1. Is there any point to niling out instance variables after releasing them? Yes because anything that tries to access them after they are released will cause a crash if they are not nil quote:2. Can I use accessors (e.g. self.something = nil) instead of releasing directly? Yes I prefer to do this but it is slightly more computationally intensive because you are calling a method rather than just setting a variable. But this can be good if you are using a custom setter e.g. to add KVO or NSNotification observers.
|
# ¿ Aug 2, 2011 07:34 |
|
lord funk posted:I cannot find any documentation about this behavior. I've added a UINavigationBar over a keyboard input, with two buttons that act as 'Tab' buttons to get to other textfields. Probably won't fix it but you should use a UIToolbar for this and not a UINavigationBar
|
# ¿ Aug 17, 2011 03:13 |
|
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 |
|
Here's something I learnt today:code:
|
# ¿ Oct 27, 2011 00:46 |
|
rjmccall posted:If the performance of your data structure is really important, you should see whether you can get away with writing it in Objective-C++ and using an STL data structure instead of NSArray. NSArray has something of a jack-of-all-trades design which is not primarily tuned for efficiency, and if nothing else, doing a message send for every access adds up pretty quickly. Objective C++ is an abomination, you could just use CoreFoundation arrays if you care about message send overhead. That way you get the added bonus of toll-free bridging.
|
# ¿ Nov 17, 2011 22:37 |
|
rjmccall posted:I'm not trying to start a holy war about languages here. There are plenty of good reasons to use NSArrays, and most programs are not going to be noticeably limited by their performance. If you find that you are, though, moving to CFArray is not a significant change. CFArrays have the same not-particularly-optimal internal structure as NSArrays, and turning a message-send into a call is an improvement but not a major one. They also both force you to use ObjC/CF objects as the elements of your array, which is either totally fine or a major boxing/unboxing overhead, depending on what you're doing. quote:Toll-free bridging is not a bonus? I mean, don't get me wrong, it's a good thing that NSArrays and CFArrays are interchangeable, but it's not like it's some crazy feature that makes CFArray totally awesome. It's just the absence of what was previously a serious interoperability problem. It's something you don't get from C++ arrays. You would have to write a bunch of code to convert your C++ arrays if you wanted to use them with UITableViews, for example, and you'd have to deal with the memory management yourself rather than rely on ARC. quote:If you don't need interoperability, and you're comfortable with C++ (which it's okay not to be!), and the performance matters, std::vector really is a significant upgrade. The performance of ObjC structures is perfectly fine, and there's absolutely no reason you would need anything else. I think the fact that none of the standard iOS apps (all of which perform great) use ObjC++ is a testament to this.
|
# ¿ Nov 18, 2011 01:11 |
|
rjmccall posted:
Webkit is legacy code (KHTML) that had been written in C++ from the beginning. So I am referring to everything other than WebKit. Sewer Adventure fucked around with this message at 04:27 on Nov 18, 2011 |
# ¿ Nov 18, 2011 04:06 |
|
rjmccall posted:Everyone I know that works on WebKit, including a lot of its technical leadership, would laugh you out of the room for suggesting that their use of C++ is simply a legacy holdover and that they'd be happier if it were written exclusively in Objective-C. The only reason it is in C++ is because it started in C++. If Apple started a web renderer from scratch it would be in Objective C. quote:Defining WebKit out of your sample is silly, because WebKit is one of only a few standard apps that both (1) actually has to work with large amounts of data and (2) cares about the speed of access to them. Stocks could hold its monitored ticker symbols in a linked list and do O(n^3) work on every UI refresh and it would be hardly one user in a million who ever even noticed a slowdown. The size of a typical address book is dwarfed by the number of DOM nodes on google.com. Mail is the only real competitor here, and Mail has serious performance problems with large mailboxes, although I doubt that has anything to do with NSArray. Google Maps is very performant and is not C++
|
# ¿ Nov 18, 2011 20:23 |
|
rjmccall posted:Okay, look, I appreciate that you have a lot of loyalty to Objective-C and want to defend it against what you perceive as my unfair slights, but you are not actually contributing anything here besides unsubstantiated claims. My point is that Objective C++ is bad.
|
# ¿ Nov 19, 2011 02:08 |
|
|
# ¿ May 5, 2024 19:51 |
|
Toady posted:FYI: Before you speak so authoritatively on Apple's thought process, you should be aware that you're arguing with someone who works on language implementation. Thanks I didn't realise that appeal to authority was a valid argument
|
# ¿ Nov 23, 2011 18:13 |