I have the following code to determine if a touch is within an image view in my table cell. However, it doesn't work. I compared the two with CGRectContainsPoint however, it doesn't work. Here is the code:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
// Declare the touch and get it's location
UITouch ...
I am writing my first iPhone app. I'm looking for direction on how to best accomplish an image zoom animation. I have a thumbnail sized image on the screen, and want to show a larger sized image overlaid on the view when the user taps on the thumbnail.
I've seen some suggestions for using the core animation framework. I saw another sugg...
I have been wondering for a while, after asking different people and without any of them providing what I would call an "at least a bit concrete answer":
Question:
Where, in an iPhone application should an application keep the references to it's Model Classes (using the MVC approach) ?
In iPhone (and Cocoa) applications we have what w...
Hello!
In my iPhone application I have two view controllers that I want to present modally. There is a root controller that presents the first one (say A), and then A presents the second one (say B). Then I want to dismiss both A and B at once, which I do by calling the dismiss… method from the root controller. The documentation states ...
I have a UITableView with complex content. The user can edit (rearrange and delete) the cells when tapping the Edit button the standard way. But I want the cells to look different in "edit" mode.
Question:
How to change the UITableView Layout in edit mode, including changing row height?
So far, this is what I have:
The Edit button se...
Hello all, Ive been working on a list app where core data is used to persist a checkmark Everything was fine till xcode crashed. No code was changed but now instead of a checkmark showing up immediatly you have to click the row, quit the app, then relaunch it to get anything. This is the code along with an other question of how I got the...
Hi all, I have a problem with adding a set of UIButtons to a UIScrollView. With the buttons added it seems that the scroll command is not being passed to the scroll view as the buttons cover the whole surface. I've read various posts on this but still can't figure it out. I'm pretty new to iPhone programming so there's probably something...
Is there an easy/generic way to compare two objects to see if they are the same? By 'same' I mean identical entity name, all attributes and relationships are the same, but the internal object ID is different.
Similarly, is there an easy/generic way to find the differences?
...
My iPhone app has few settings that users is likely to change quite often. I would like to know if there's any suggested way of handling such settings (reading and saving them). On Apple sites I found only a tutorial about integrating your application settings with Settings app (link) but I don't want a user to exit my app so he could ju...
I have a custom tablecell with an embedded MapView showing a small area. When the user selects the cell, I want to push a new view with a larger mapview and some more information, like distance from where you are, option of what map-type etc.
If I leave a small margin around my mapview, the user can click in that margin to select the ce...
I have a class Test which has an array of Foos. I want to provide access to the Foos without exposing the ivar directly. I'm trying to make this KVC compliant (also to pave the way for KVO compliance). I have:
Test.h
@interface Test : NSObject
{
NSMutableArray *foos;
}
@property (readonly, copy) NSMutableArray *foos;
@end
Test....
Basically, I have an array of buttons I want to iterate and highlight (among other things) one after another, with a delay in-between. Seems like an easy task, but I can't seem to manage to get it to work cleanly while still being responsive.
I started out with this:
for MyButton *button in buttons {
[button highlight];
[button...
I have a general question about objects, memory, and retaining.
I am not a complete newb (I have apps for sale on the iTunes Store) but something must have slipped past me. I work with the Google Docs API, and yesterday I was downloading a spreadsheet feed, and enumerating the results, namely, the Spreadsheet Record Feed.
After enumer...
This is probably not as hard as I think it is, but how can I select part of an image? Consider the following example:
The grey area is an image in the PNG or JPG Format, now I want to select the red 80x80 px area from it. The red area should be displayed, the rest not. I have tried numerous approaches:
Make ckipsToBounds of UIImageV...
Suppose I'm doing some iPhone development and I have a subclass of UIViewController. And suppose this view controller has a NSOperationQueue which is created in viewDidLoad and released in dealloc.
Now suppose at some point while this view controller is alive, it adds an NSInvocationOperation to the NSOperationQueue and the operation...
I simulate a memory warning on the simulator.
SettingsViewController releases it's view since it is not showing.
I display the SettingsViewController view, loadView gets called, and then in viewDidLoad, the program hangs on the following line of code:
self.unitSwitch.selectedSegmentIndex = 1;
On my terminal, I get this message:
-[NS...
I'm trying to setup application unit tests for my iphone app. So I made a copy of the app target, and a unit test bundle target as described in apple's documentation.
After following Apple's directions, I wasn't able to reference my classes in the unit tests, so I linked the app into the unit test bundle using the "Bundle Loader" build ...
When you take photos witha UIImagePickerController on the iPhone, I and many internet denizens have found you need to run the images through this function to orient them properly (and scale them while you're at it).
There is a giant thread about it here: http://discussions.apple.com/message.jspa?messageID=7276709
Unfortunately, this fu...
I've got a view when I want to use UIPickerView but my application supports also UITabBar. I want to display UIPickerView in the same spot where keyboard pops up but the problem is that when I do that tab bar buttons are above picker and only half of it is beign displayed. Is is possible to temporary disable tab bar before I draw a picke...
Hi, I have an requirement to implement a custom keyboard for a Cocoa Touch data entry screen containing multiple UITextFields. I've built the keyboard, and everything is working except now I need to figure out how to implement a blinking cursor. (When you disable the UITextField's built-in keyboard, you lose the cursor as well). In googl...