When you create a new UIView XIB in Interface Builder, it is by default full-screen. Width and height cannot be changed, they are dimmed out. What to do?
Switch to Simulated Metrics and change "Status Bar" from default (gray) to None. Now you can edit the size!
First time this was difficult to discover, second time I kind of recalled what to do and now it's all so plain obvious :)
Wednesday, April 20, 2011
How to Change UIView Size in Interface Builder
Easy Way to Debug UIView Hierarchy
Do you want to see complete view hierarchy for debugging purposes? There is an easy way to do it, provided by Apple - totally unofficially!
Actually official documentation says it's undocumented and not supported. No problem with that. Very kind of Apple, good developer service!
Actually official documentation says it's undocumented and not supported. No problem with that. Very kind of Apple, good developer service!
Monday, April 18, 2011
Operation failed with underlying error 4294956467
Thanx Xcode, that was very informative. I'll fix it right away! Oh wait, what was that...
Failed to launch simulator: Operation failed with underlying error 4294956467.
Friday, April 15, 2011
No New Fonts in iOS 4.3.2 Either
While I still remember... Yes, I checked iOS 4.3.2 update. There are no new fonts, when compared to iPhone or iPad running iOS 4.3 or 4.3.1. Don't have iPad2, but I doubt there's any new fonts in that device alone.
Sometimes no news is the news.
Previously released iOS 4.3 has new Noteworthy font and there is also a complete list of iOS 4.2.1 fonts. I do have locally more complete table of fonts, should make it public.
Got a new feature for my fonts application: autocheck whether there are any new fonts. Invest a day worth of development to save 15 minutes of boring manual work!
Sometimes no news is the news.
Previously released iOS 4.3 has new Noteworthy font and there is also a complete list of iOS 4.2.1 fonts. I do have locally more complete table of fonts, should make it public.
Got a new feature for my fonts application: autocheck whether there are any new fonts. Invest a day worth of development to save 15 minutes of boring manual work!
Initializer Element Is Not Constant
This code might look valid to less experienced iOS developers, but it does give a compiler error "initializer element is not constant":
static NSArray *playState = [NSArray arrayWithObjects:
@"MPMoviePlaybackStateStopped",
@"MPMoviePlaybackStatePlaying",
@"MPMoviePlaybackStatePaused",
@"MPMoviePlaybackStateInterrupted",
@"MPMoviePlaybackStateSeekingForward",
@"MPMoviePlaybackStateSeekingBackward",
nil];
Wednesday, April 13, 2011
Better Debug for CGRect, CGPoint and CGSize
Can't remember how many times I've wanted to debug what is the size of a frame. Can't remember how many times I've written x and y coordinates, followed by width and height, to console log.
All wasted time and effort, while I could have been doing something more productive! Live and learn: just found out that iOS SDK contains helper routines for that task:
All wasted time and effort, while I could have been doing something more productive! Live and learn: just found out that iOS SDK contains helper routines for that task:
Labels:
CGRect,
debug,
NSLog,
NSStringFromCGRect,
UIKit
Monday, April 11, 2011
Easy Way to Create Settings View
Most applications need settings or at least a way to display version number. In theory it's very simple: just show a short list with a few hardcoded rows. It could be difficult, but since "settings" is such a common use case, Apple iOS SDK offers special support. It's not quite perfect, so let's check the possibilities.
Subscribe to:
Posts (Atom)