Example:
I have 10 view controllers, which are all allocated and initialized in the same way:
UIViewController *controller = [[MyViewController alloc] initWithNib];
(note that -initWithNib is a custom method of a UIViewController subclass)
The next view controller class is OtherViewController, and so on. I want to load the view cont...
I have a class XMLParser. It works fine as long as I don't remove the commenting of the line that adds the nodes to the NSMutableArray:
[nodes addObject:self.currentNode];
If I do that, the application crashes - without leaving any trace in the debug log.
How can this be?
XMLParser.m:
#import "XMLParser.h"
#import "MyViewController....
I have an iPhone application in which a number of domain objects are populated with user-entered data. In order to restore state after being interrupted, these objects implement the NSCoding protocol and are written to disk (the Documents directory) in the applicationWillTerminate message. Then, when the application is launched again, th...
I have a UITableView which is using custom UITableViewCells to display some information. I'd like to add a UITableViewCellAccessoryDisclosureIndicator to the cells. Every method that I try successfully adds the chevron, but once the table view scrolls down, they disappear. I'm doing the standard dequeueReusableCellWithIdentifier method, ...
I have a view with only one UITextView that is used to enter a value. I want that when the view shows, the textview becomes the first responder (that's the easy part) and also the default keyboard shows up. I tried searching for this in speca but to no avail. There are many posts on how to dismiss the keyboard, but what I want is to show...
I have a quick question regarding tracking touches on the iPhone and I seem to not be able to come to a conclusion on this, so any suggestions / ideas are greatly appreciated:
I want to be able to track and identify touches on the iphone, ie. basically every touch has a starting position and a current/moved position. Touches are stored ...
So I have a stack of three UITableViewControllers, each of which displays its view correctly underneath the navigation bar when I tap through the UI manually.
However, now I'm working on restoring state across app restart, and so I'm pushing the same two controllers on top of the root view controller, one at a time, in the same method i...
Update
Daniel was close, it just wasn't the search path. The Prefix Header under GCC 4.2 was set to:
$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h
I missed that when I was combing through the first 2 times.
I removed it and now all is well.
Original Question
I have been using/building products with a static lib...
I think the title is pretty clear. I have ran into this twice now.
The first time it indicated a problem, and my project wouldn't compile.
The second time everything still worked.
Is it just a fluke if my code still builds when this turns red?
...
As a Cocoa noob, I'm having a few issues with Interface Builder, UIViewController and friends.
I have a UIViewController subclass with a UIView defined in a xib, and with the controller's view outlet connected to the view. The xib's "file's owner" is set as my controller subclass.
In this one instance, the following code to load the co...
This is driving me nuts. I just uploaded my first app to the App Store for the first time, and of course, now my app is exploding left and right. When I build with release build configuration, I randomly get an EXC_BAD_ACCESS after banging on the app for some variable amount of time. I turned Zombies back on, but the problem doesn't appe...
Hello,
I move a UIImageView with touchesbegan, touchesmoved, touchesended.
It works well, but is the touches get also applied to other UIImageViews,
laying around.
How do I lock touching activity while moving the UIImageView? I've tried this
with a Boolean Value, but it hasn't worked, because touchesmoved get called
every time the UIIm...
I have an class that inherits from UIViewController. There, I want to make some ivar initialization like this:
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)nibBundle { // Load the view nib
NSLog(@"Hello Earth!");
if (self = [super initWithNibName:nibName bundle:nibBundle]) {
self.visibleIndex = 0;
NSLog...
I have an core animation block where I call a method that will load a view controller. there is an custom transition between two view controllers happening. However, when the view controller builds up the interface, all this stuff is affected by core animation. Although it results in some interesting effects, I don't want that ;)
[UIVie...
Here's what I've come up with:
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:1]; // my table view has 2 sections
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationTop];
Everytime I build and run, it throws the following exception:
Invalid update: inval...
I thought to be clever and just put an transparent UIButton over an UIImageView with the exact frame size, so that I can wire it up easily with any event I like, for example TouchUpInside, and make it call a action method of an view controller when the user touches it. Well, it works until alpha is below 0.1f. If I do 0.01f, it will not ...
I want to make two different app icons, and programmatically switch betweem then. When the user quits the app without finishing an workflow-process, then I want to switch to an icon that will indicate that there's something undone when launching the app. Well, just theoretically, just for testing.
I think that the icon file is just a no...
I've seen a lot of iPhone apps that will dim the screen with an activity indicator when it's updating or downloading something to let the user know it's busy. I know how to do the activity indicator but how do I go about doing the dimming? Please post example code if you can.
...
I am using the three20 open source project by Joe Hewitt.
have the following code in a UITableViewController:
_tabBar1 = [[TTTabStrip alloc] initWithFrame:CGRectMake(0, 0, 320, 41)];
_tabBar1.tabItems = [NSArray arrayWithObjects:
[[[TTTabItem alloc] initWithTitle:@"item1"] autorelease],
[[[TTTabItem alloc] initWithTitle:@...
UI crimes aside... I'd like to have a UILabel replace a UITextField after some user input. Is there an easy way to accomplish this so when the UITextField is hidden its value gets replaced by a UILabel that doesn't appear to move...appearing to "set" into the background so to speak?
I've managed to do this by nudging the fields around i...