I'm attempting to set the UITextViews in a set of UITableViewCell's to editable when the user taps the "edit" button for the UITableView. Each UITableViewCell has a UITextField (cell.blurb). This code will set each UITextView to editable, however, the cursor alternates very rapidly between each one. I'm pretty sure it's a responder ch...
How can I make a timer that counts down from 3 and then runs a method? How would I do that?
...
I have a custom UIView subclass. In IB, I have specified a "placeholder" UIView and set the class to my class name. My override of drawRect method is working, and the background is coloring properly, but the initWithFrame is not firing. Why?
- (id)initWithFrame:(CGRect)frame {
NSLog(@"initWithFrame");
if ((self = [super initW...
I need help with downloading from webserver...
What i currently do is get XML file from web servers that contains image locations, parse XML, download each image, store image on iphone, and store image name to sql database.
This takes lots of time because there is large amount of images to be downloaded and i am downloading one by one....
I'm looking for a smart way to remove a subview (with removeFromSuperview) when the subview itself (or precisely said one of its components) triggered the removal. As for the source code this would be like
UIView * sub_view = [[[UIView alloc] initWith...
UIButton *button = [UIButton buttonWithType...
[sub_view addSubview:button];
[se...
Using the TARGET_IPHONE_SIMUATOR macro results in the same constant values being defined in am application. For example:
#ifdef TARGET_IPHONE_SIMULATOR
NSString * const Mode = @"Simulator";
#else
NSString * const Mode = @"Device";
#endif
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
...
NSLog(@"Mode: %@", M...
How can I make a button that says "Show Picture" and when it's clicked it changes to "Hide Picture". I'm new to objective C, I know how to make a button in interface builder but don't know how to switch the button's text and function. Can someone help me out?
...
My Core Data model looks like this:
The players relationship of the entity Game is a to many relationship and will hold all the player objects related to that Game entity.
I have a UITableView that looks like this <-- link .
The Table View displays all the games, how would I, when selecting a Game show/push another UITableView to dis...
Is there any way to make a UIView resign its first responder status when the user taps outside of the view bounds?
...
I was just wondering why the name popover was chosen vs a hypothetical UIPopupController.
...
When I add an icon to a UIBarButtonItem via the Interface Builder, the icon is displayed white. When I add the same icon file programmatically to another UIToolbar, the icon is displayed black. Why?
UIImage *image = [UIImage imageNamed:@"icon.png"];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:image ...
I am adding a badge to my UITabBarController's UITabBar as such:
UITabBarItem *tbi = (UITabBarItem *)[stTabBarController.tabBar.items objectAtIndex:1];
tbi.badgeValue = @"2";
However, my UITabBarController is customizeable, so the index may change. How can I make sure the badge gets applied to the correct UITabBarItem?
...
I want a UITextField to be sent the resignFirstResponder message if it is being edited and a user touches elsewhere on the screen. Since there are several text fields I need a way to programmatically determine which one is the first responder to send it the message. How can I do this? Is there some sort of global first responder object?
...
I tried this code in the view controller, but it didn't work. Why is that?
- (void)viewDidLoad {
[self setBackgroundColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]];
[super viewDidLoad];
}
...
I'm trying to understand how these two are connected. Every time you make a UIViewController does it also automatically come with its own UIView?
Also are these from Cocoa or Objective-C?
...
Still having trouble with this language.
Ok, let's say I have two objects. The first is my application delegate, the second is a custom view containing the various buttons that make up the main menu. When a button is clicked, it is the menu that responds. However, I need to make use of certain instance variables in the application deleg...
I'm new to the iPhone submission process. Apple asks for the Bundle ID Suffix. What is this? Not sure what to put here and what the significance of it is.
...
I want to detect the very first time my view is displayed. After that, I wan't to forget about it. Where can I set a BOOL to do this?
...
Is their anyway to change the white part of a round rect button with out making a custom button?
...
playerOneScore is a int, How can I pass it to use a label to display the score? This code just prints %i...
-(void)updateScoreLabels{
playerOneScoreLabel.text = @"%i",playerOneScore;
playerTwoScoreLabel.text = @"%i",playerTwoScore;
playerThreeScoreLabel.text = @"%i",playerThreeScore;
playerFourScoreLabel....