I've subclassed an UIImageView. After
self = [super initWithImage:image]
I try to access the self.frame.origin.y value. But it is always 0.0. One moment later, in a method that gets called from the outside, the property is fully there with a nice 100.0.
I also tried to override -(id)initWithFrame:(CGRect)aRect, but the result is the...
I have a table view that is placed in front of a scroll view. When the user drags vertically I want the table to scroll up and down and when they drag horizontally I want the scroll view behind to scroll its image.
I understand how to check the touches using the UIResponder delegate methods to sense whether the user is scrolling horizon...
I have an iPhone program that consists of a number of UIViews that are sitting on top of another UIView, and that can be moved around. I am drawing connections between the UIViews using the drawRect: method in the containing UIView. It all works great.
The only problem is that when I use animation to move the views around, the backgroun...
So here's my setup:
User spins PickerWheel, chooses which section of the app to navigate to.
The app loads a UIViewController from a XIB file and pushes it on to the navigationController stack
User can pop back at anytime and choose another section to navigate to - the viewController is (supposed to be) completely destroyed and re-allo...
I load a UIWebView from a string in a navigation based app. I'm using this in a UIWebView's header tag:
<meta name="viewport" content="width=320,height=420,user-scalable=yes,initial-scale=1.0">
I use viewport at 1.0 because image sizes don't have to be readjusted, which is the case without viewport. When the phone is rotated to land...
In cocos2d does anyone know how to center a sprite? Right now, I have a sprite that moves to where you touch on the screen. The problem is that the sprite is aligned to the lower left corner. This means that instead of moving down, if you touch just a little over the bottom the sprite will move up. Thanks in advance!
Here is my code...
...
So my menu calls a game with this piece of code:
game = [[Game alloc] init];
[self presentModalViewController:memoryTest animated:FALSE];
A UIViewController then appears with a countdown. The player can go back to the menu DURING the countdown. However when I try this, the countdown keeps running and eventually the game starts, even t...
I have a UITableView which is populated by an array, I have a button on the navigaton bar which (when pressed) adds an item to the array and calls [self.tableView reloadData] in the UITableView. This results in numberOfRowsInSection being called and returning the correct number of rows (the number of items in the array) BUT doesn't call ...
I need to build an application which will run on OS X, polling for data, and displaying that data full-screen in a purty, graphical way - generally "identifier: value" text in some sort of tabular format, but possibly with spark-lines to display historical changes, and "animations" (nothing fancy, just fading text and similar) to show up...
It's so harrying: Every time when I connect my iPod touch to my mac, iTunes launches and starts synchronizing. This causes collisions with Xcode when it tries to install the app on the device in this time. And my exposé-windows always jump to the iTunes window. Then I have to wait, wait, wait, dismiss the stupid question like "you really...
I've built a custom UI for my table that has a darker UI and a custom accessoryView. When I put the table into editing mode, there is a white line to the left of the reorder control that I can't seem to get rid of.
tableView:accessoryTypeForRowWithIndexPath: doesn't seem to be appropriate for getting rid of it since I'm not using a s...
Hello,
I've created a subclass of UIButton to allow me to have a checkbox on the iPhone. This checkbox is part of a subclass of UITableViewCell.My question is how I can attach an action to the button being pressed and have that method implemented in the tableView controller?
I tried using the addTarget:action: method but this doesn't s...
I have an class "Cube" and in there is a method -rotate. The method sets the anchorPoint at the bottom left and then rotates the cube by 90 degrees. After that, another method is called, which makes the cube to rotate back by -90 degrees. That's done specifying the stop selector. Btw: This has no special purpose. Just learning!
-rotate ...
What are some best practices to keep in mind when working extensively with SQLite on the iPhone? Tips/tricks/convenience factors all appreciated.
...
Hi,
How can I tell my UITableViewController to use my custom UITableView subclass for it's tableView instead of a regular UITableView?
Many thanks,
Michael
...
I create a custom right view as follows:
// Build the Segmented Control
NSArray *segmentTextContent = [NSArray arrayWithObjects:[UIImage imageNamed:@"arrow-dice.png"], [UIImage imageNamed:@"arrow-up.png"], [UIImage imageNamed:@"arrow-down.png"], nil];
UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:segme...
Does anyone have an example of how to draw the blue "unread dot" used in Apple's Mail App? This one in specific: http://bit.ly/3A7XxD
Drawing an ellipse is straight forward with Quartz2d, but the subtle use of shadows+gradients make this look really 3d.
...
I have a custom view in a custom table cell. Every time a specific property on the custom view is changed I call [self setNeedsDisplay] which redraws the view in - (void)drawRect:(CGRect)rect. That property is set in the table view delegate's tableView:cellForRowAtIndexPath:. But when the table view is larger than the screen and cells ha...
NOTE: I added my new solution at the UPDATE answer below.
I try to recreate the effects we saw in Mobile Safari's tab on iPhone/iPod touch.
Basically, it's a UIScrollView that holds 4 reusable UIView (acting like ring buffer), and scrolls horizontally. When scrolling, the UIView's opacity will fade in/out seamlessly with offset.
Curr...
everyone seems interested in building IPhone apps today. Do you have to have an iphone to build an app? Is there a development / test environment that simulates the iphone experience to avoid having to purchase one.
if yes, what are the next steps in moving forward on this?
...