|
I just spent the whole morning figuring out why I suddenly had to register Nibs for my UITableViewCell reuseIdentifiers. Turns out the template for UITableViewControllers replaces this: UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; with this: UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; The latter is iOS 6 only, and requires you to register the identifier manually, with a class or Nib to use as a default. Is there any advantage to that?
|
# ? Sep 23, 2012 17:29 |
|
|
# ? May 17, 2024 16:27 |
|
It avoids the whole if (!cell) cell = [[UITableViewCell alloc] initblahblah...] dance in your data source. I'm not sure but I have a hunch that's also the machinery used when you give a table cell prototypes in a storyboard.
|
# ? Sep 23, 2012 21:01 |
|
The cells are also reused when they scroll off, and that is the mechanism to get an old one to reuse, or create a new one.
|
# ? Sep 24, 2012 01:45 |
|
Doc Block posted:Clarified your example. thanks Doc Block and pokeyman!
|
# ? Sep 24, 2012 03:56 |
|
For anyone looking to learn about auto layouts, I found session 220 to be incredibly elementary and a waste of time; session 228 is much faster-paced and worthwhile. Personal gripes: the woman in 220 has lots of pauses, repeats herself, and giggles a lot.
|
# ? Sep 24, 2012 04:56 |
|
Bumping playback speed to 1.5x or even 2x can help a ton.
|
# ? Sep 24, 2012 04:58 |
|
pokeyman posted:Bumping playback speed to 1.5x or even 2x can help a ton. Then I can't really understand what's going on (hearing impairment) and I can't seem to find subtitles.
|
# ? Sep 24, 2012 05:05 |
|
Oh, that's definitely not very helpful then. A transcript/subtitles would be fantastic.
|
# ? Sep 24, 2012 07:08 |
|
Of course, immediately after complimenting Xcode 4.5 in this thread, I've gotten one of my projects into a state where it will not run in the debugger at all. It's the wonderful no such file or directory error which lists the valid path to your debug executable and can be caused by about 200 different things I am now going through one by one after a standard fuxcode/restarting everything had no effect.
|
# ? Sep 24, 2012 07:55 |
|
Anybody know of a way to get a modal UINavigationController (and its children) to re-lay themselves out after hiding/showing the statusbar?
|
# ? Sep 24, 2012 11:49 |
|
Where can I find documentation about what happens when the on screen keyboard is up and someone presses the voice input button? Like what happens with the app's volume? I see some (all?) apps lower the volume at that point, is that the system or the app responding to a delegate call? What about returning volume when the input is done?
|
# ? Sep 24, 2012 14:27 |
|
ManicJason posted:Of course, immediately after complimenting Xcode 4.5 in this thread, I've gotten one of my projects into a state where it will not run in the debugger at all. It's the wonderful no such file or directory error which lists the valid path to your debug executable and can be caused by about 200 different things I am now going through one by one after a standard fuxcode/restarting everything had no effect. Make sure Xcode is closed when you do fuxcode. I don't know about 4.5, but often (always?) Xcode 4.4 would lock your projects derived data directory (or something) so that it couldn't be deleted.
|
# ? Sep 24, 2012 16:14 |
|
Froist posted:I don't think this is that strange is it? I did the same (but with a static UIImage) on a game I finished recently. It just depends on what your reasoning is. It may sound strange to use UIImages on a transparent Cocos2D because Cocos2D already comes bundled with stuff for gradients and parallax backgrounds.
|
# ? Sep 24, 2012 16:45 |
|
Doc Block posted:Make sure Xcode is closed when you do fuxcode. I don't know about 4.5, but often (always?) Xcode 4.4 would lock your projects derived data directory (or something) so that it couldn't be deleted. Yeah, it was. After doing all of the normal steps a few times over and in different orders, it finally fixed itself after doing a clean, quitting Xcode, doing a git clean, fuxcode, shutting off the iPad, shutting down the OSX box, and bringing everything back up. Standard Xcode.
|
# ? Sep 24, 2012 18:14 |
|
I've been very fortunate in that I don't have issues with Xcode very often. And when they do crop up, restarting Xcode usually fixes the problem.
|
# ? Sep 24, 2012 19:53 |
|
Doc Block posted:I've been very fortunate in that I don't have issues with Xcode very often. And when they do crop up, restarting Xcode usually fixes the problem. It has gotten so much better than the early 4.x versions.
|
# ? Sep 25, 2012 01:42 |
|
Why are loving iPad storyboards impossible to use even on my 27" monitor? Literally the only benefit over nibs is you can see "ok, this view can lead to that view". But since you can't actually EDIT anything (not to mention see anything) unless you're zoomed way the gently caress in, you basically never use an overview. They're fine for iPhone but wow, they don't add a lot to the iPad party.
|
# ? Sep 25, 2012 07:40 |
|
Yeah, it drives me insane that I can't select a level of magnification.
|
# ? Sep 25, 2012 08:05 |
|
Trying to do that on a 1680x1050 MBP makes me want to slice my face off. I only started doing iOS dev work when Xcode 4 came out and a buddy of mine said that in 3 there was a magnification option that they removed when dealing with nibs that they removed. Is that true?
|
# ? Sep 25, 2012 18:41 |
|
kitten smoothie posted:Can I keep using 4.4 to build, put the Default-568h@2x.png file in there, and that's all it would take to force it to run in tall mode on an iPhone 5? Then if I'm being smart enough about laying out my UI relative to the window size, everything'd be great on either device? For what it's worth, it looks like you can in fact do this. So I can at least still keep supporting armv6 devices this way until I absolutely need to use an iOS 6 feature. If you build in 4.4 and include the 568h launch image, the phone will still stretch things properly. I just had to fix autoresize on some of my UI elements and everything looks just dandy on an iPhone 5. I couldn't use 4.4 to debug on an iPhone 5, so I had to do all that in 4.5. But then I could go and do an ad-hoc build in 4.4 with armv7 and armv6 support and have it work on the iPhone 5. Have not tried submitting to the store like this but probably will do that next week.
|
# ? Sep 26, 2012 02:44 |
|
Do people really care that badly about supporting the iPhone and iPhone 3g? Even the 3GS has an ARMv7 CPU.
|
# ? Sep 26, 2012 03:41 |
|
Doc Block posted:Do people really care that badly about supporting the iPhone and iPhone 3g? Even the 3GS has an ARMv7 CPU. The more relevant part is that Apple used to not allow removing armv6 support in an update. Has that changed?
|
# ? Sep 26, 2012 04:48 |
|
Doc Block posted:Do people really care that badly about supporting the iPhone and iPhone 3g? Even the 3GS has an ARMv7 CPU. I am more wanting to keep the 3G and the 2nd gen iPod Touch supported. The 3G is a 4 year old device, but they did sell it up until the 4 launched so there are at least some people who only recently came off a 2-year contract to buy it. Honestly though I have just one more feature update on the app to roll out and then assuming it needs no bug fixes, it'll be the end of the line for those old devices. I was just hoping to also bundle in iPhone 5 compatibility at the same time. Plorkyeran posted:The more relevant part is that Apple used to not allow removing armv6 support in an update. Has that changed? kitten smoothie fucked around with this message at 05:02 on Sep 26, 2012 |
# ? Sep 26, 2012 04:58 |
|
Plorkyeran posted:No third-party apps on the original iPhone, so just the 3G. Yes. I submitted an update that took the app from armv6 & armv7 to just armv7 with no problems. It just depends on your deployment target. Was also moving the app to only support iOS 5+ anyway, so it wasn't a big deal. BTW, the original iPhone also got the App Store when "iPhone OS" 2.0 came out.
|
# ? Sep 26, 2012 07:35 |
|
Why do I get an hour added here?Objective-C code:
Objective-C code:
Carthag Tuek fucked around with this message at 16:41 on Sep 26, 2012 |
# ? Sep 26, 2012 16:06 |
|
Just in case any of you still get the infuriating bootstrap error where you have to reboot your Mac to run in the simulator, here is a fix: http://www.mikeash.com/pyblog/solving-simulator-bootstrap-errors.html Short version is: launchctl list|grep UIKitApplication|awk '{print $3}'|xargs launchctl remove Doesn't work on the device unfortunately so you'll still have to reboot that but it's far less annoying than rebooting your Mac (though the SSD has helped a ton with that*) * Seriously, get an SSD. The difference it makes is insane. It makes my life as a developer easier every day. It makes Xcode seem silky smooth with no stuttering.
|
# ? Sep 26, 2012 19:56 |
|
Carthag posted:Why do I get an hour added here? For what it's worth, I see a time zone change that I can't immediately explain (current locale is Mountain Daylight Time, current calendar Gregorian): code:
pokeyman fucked around with this message at 20:14 on Sep 26, 2012 |
# ? Sep 26, 2012 20:08 |
|
Hi - is it possible to include information like text messages or alarms within an app? For example, could you have a text message appear within a game? I know by default they are set not to interrupt a running app, but I was wondering if there's a way to include those notifications within an app in a new way.
|
# ? Sep 26, 2012 20:27 |
|
No, those are (rightly) outside the application's control.
|
# ? Sep 26, 2012 20:52 |
|
pokeyman posted:For what it's worth, I see a time zone change that I can't immediately explain (current locale is Mountain Daylight Time, current calendar Gregorian): Yeah, DST... After some more digging, setting the calendar's timezone to UTC fixed it. I just changed it directly on my calendar object (which isn't currentCalendar, I'm not sure whether that would have sideeffects, but could be dangerous) and got the right result.
|
# ? Sep 26, 2012 20:54 |
|
Doc Block posted:No, those are (rightly) outside the application's control. thanks!
|
# ? Sep 27, 2012 03:08 |
|
Why the heck hasn't Apple made a pull segue or added options for push right/left?
|
# ? Sep 27, 2012 03:30 |
|
Doc Block posted:No, those are (rightly) outside the application's control. Why do you consider that "right?" I mean, I accept that it's the reality of the iPhone, but I still prefer a permissions-based system like Android allows.
|
# ? Sep 27, 2012 04:12 |
|
Because it's what's best for the user. A list of permissions you have to browse through and check off isn't very user friendly, and like UAC in Windows Vista, just leads to users getting annoyed and agreeing to everything. What's best or easiest for developers should come second to what's best for the users.
|
# ? Sep 27, 2012 05:07 |
|
I'm trying NSMetadataQuery to let iCloud let me know of updates. However: code:
Any suggestions?
|
# ? Sep 27, 2012 09:43 |
|
Doc Block posted:Because it's what's best for the user. A list of permissions you have to browse through and check off isn't very user friendly, and like UAC in Windows Vista, just leads to users getting annoyed and agreeing to everything. You don't need to do anything beyond clicking "Install" once Android tells you what permission the app requests. While that is indeed slightly more work than simply clicking install, it has to be balanced by the fact that, on iPhone, if you don't like the default text messaging app, there's nothing you can do about it because Apple is the only one who can do anything with text messages. I understand that there's reasons why Apple does what it does, but I don't think that any single approach is definitively wrong or right.
|
# ? Sep 27, 2012 15:36 |
|
PT6A posted:You don't need to do anything beyond clicking "Install" once Android tells you what permission the app requests. While that is indeed slightly more work than simply clicking install, it has to be balanced by the fact that, on iPhone, if you don't like the default text messaging app, there's nothing you can do about it because Apple is the only one who can do anything with text messages. So the user doesn't even get the option of telling the app "No" for certain permissions? Accept everything or don't install the app at all? Sorry, but you aren't really selling me on Android here.
|
# ? Sep 27, 2012 20:30 |
|
To be fair, up until iOS 6, apps could silently scrape your contacts and other data (see also: Path). It is nice that now users have granular control of that, and it prompts the user at runtime when the app wants to actually use that info.
|
# ? Sep 27, 2012 21:56 |
|
Which was an oversight. iOS apps have always had to ask for permission to access your location, photos, bug you with push notifications, etc., and have had to do it separately, and users can always say no.
|
# ? Sep 27, 2012 23:42 |
|
|
# ? May 17, 2024 16:27 |
|
Been doing iOS work for the past 2 weeks so I'm still new and I've hit a roadblock: I have a UILabel with a set width and height (let's say 50x50). I want said label to have only 2 lines of text. I do not want any word wrapping. I want this text to scale so that the text will fit within the UILabel's dimensions with two lines. I've set numberOfLines, minimumFontSize, adjustsFontSizeToFitWidth as well as code:
|
# ? Sep 28, 2012 00:42 |