I have one like this:
CALayer *layer = stripeButton.layer;
CAKeyframeAnimation *moveAnim = [CAKeyframeAnimation animationWithKeyPath:@"bounds.origin.y"];
moveAnim.duration = 3.35;
moveAnim.repeatCount = 0;
moveAnim.autoreverses = NO;
moveAnim.removedOnCompletion = NO;
moveAnim.calculationMode = kCAAnimationLinear;
moveAnim.fillMode = kC...
I have a UIImage. There are 3 colors, white (=sky), black (=player) and green (=floor). When the black player collides with the white sky only, i make him fall down. When he collides with the white sky AND with the green floor, i stop him.
The Image: http://img39.imageshack.us/img39/4290/colormapb.jpg
Now my question: How can i read th...
Since CoreData has become available for the iPhone in OS 3.0, is it meant to be the answer to data persistence and replace all need for direct SQLite?
What reasons exist to still use SQLite? What are advantages/disadvantages of SQLite vs. CoreData?
...
Hi,
I have an UIView which I want to give a gradient background and I'm wondering how to implement that as efficient as possible.
I am considering three options:
Create an UIImageView as subview and give it an image of the gradient to display.
Draw the gradient image in drawRect: of the original UIView.
Draw the gradient in drawRect:...
I am getting errors of type EXC-BAD-ACCESS where I create a new UIImage instance by assigning the value of a pre-existing UIImage (as below) and I am trying to figure out what the problem is. There is a heap of code to sort through and I am not sure where to start so I won't bother posting source -- but it might help me in my investigati...
Is it possible to create sqlite index based on "multiple fields" using core data?
In my present sqlite based schema, I have an index based on two fields, name and state. How do I create similar index using core data?
...
I would like to create a pin-code dialogue, like the one you can switch on on the iPhone.
For those who have not seen it, it consists of four boxes and a number keypad. When you enter a digit, a dot appears in the first box. And so forth. When you hit the delete button, the last dot is removed.
I have this set up as four UITextFields a...
I have a two tab bar,In first tab ,i can drill down more than three... but in second tab i cannot drill down more than one.. Any ideas?
code:
DemoAppdelegate.m
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[window addSubview:tabBarController.view];
}
First tab controller is "FirstViewController"
in FirstViewCont...
I keep running across references to MacRuby and was wondering if any of you have used it for iPhone/Objective C programming.
The MacRuby website says, "the goal of MacRuby to enable the creation of full-fledged Mac OS X applications which do not sacrifice performance in order to enjoy the benefits of using Ruby."
So, my question is: wh...
I am trying to get the number of rows for a given request. The only obvious way I've found to accomplish it is:
NSManagedObjectContext *context;
NSFetchRequest *request;
...
NSInteger count = [[context executeFetchRequest:request error:&error] count];
This seems wasteful to me, building an entire array of a large database's objec...
I'm a bit confused all as to why the belowSubview does not work.
I'm adding some (subviews) to my navigationController and all of that works well.
-(UITableView *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
...
...
[self.navigationController.view addSubview:ImageView];
[self.navigat...
I want to compare if an variable A represents the same object as variable B does.
Could I do that with the == operator?
Or what else is this exactly looking at? I think I need to check for the memory adress of the object where the variable is pointing to, right?
...
I'm trying to set up an NSinvocation to upload a picture to a website. I'm doing this:
Set up the nsinvocation object
Add a UIImage* to the nsinvocation object as an argument, along with some other arguments
invoke the nsinvocation when needed
the function called when I invoke nsinvocation can't access the UIImage- I get NSInvalidArgu...
I have a subclass of UITableViewController. I have code that can add/remove a UISearchBar to/from the tableHeaderView of my tableView. Here's the code I have to perform these tasks:
self.tableView.tableHeaderView = uiSearchBar; //Make the search bar appear
self.tableView.tableHeaderView = nil; //Make the search bar disappear
The probl...
For a vertical scroller are there any advantages to using UIScrollView over UITableView?
I ask because I am currently using two vertical UIScrollViews with UIImageViews inside of them and am having memory issues and poor scrolling performance. I am not doing much with the scrollers, only highlighting images as they scroll into the cent...
I'm having a UITableView with alternating colored UITableViewCells. And the table can be edited: rows can be reordered and deleted. How do I update the cells alternating background color, when the rows get reordered or deleted?
I'm using this to draw the alternating colored cells:
- (void)tableView:(UITableView *)tableView willDisplayC...
Right now I'm using this in my -viewDidLoad method:
UIToolbar *toolbar = [[UIToolbar alloc] init];
UIBarButtonItem *flexibleSpace = [UIBarButtonItem alloc];
flexibleSpace = [flexibleSpace initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil
action:nil];
// Add a back button to allow user ...
I've searched for the answer to this question but I can't seem to find it, and logically this process makes no sense to me...
I added a default.png to my app and I didn't like the fact that it didn't show long enough, so I removed it and was going to add a splash screen instead.
The problem is that the default.png still shows on load. ...
I can't figure out why, for the life of me, the NSFetchedResultsControllerDelegate methods are not firing when I add data to the underlying datastore. The data shows up immediately if I restart the iPhone application.
I have subclassed UITableViewController and conform to NSFetchedResultsControllerDelegate:
@interface ProjectListViewCo...
I am attempting to create a table view whose cells can be reordered (using the tableView:moveRowAtIndexPath:toIndexPath table view data source delegate method). What I have written works fine in the simulator (in OS 3.0) but not on the device (iPod touch with OS 3.0). The drag controls are visible on both the simulator and device, and ...