I have made sure that all superviews of my customized UIImageView and the UIImageView itself have userInteractionEnabled = YES;
Also in the nib all views and subviews have userInteractionEnabled = YES;
But for some reason, these get never called when I click on the UIImageView:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent ...
Instruments tells that there are "misaligned images" which are animated by core animation. What does that mean?
UPDATE: I've seen that in Instruments.app > Core Animation.
...
I guess that the "# Net" column is the most interesting, although I don't really understand what that's supposed to mean. Total number of currently allocated objects? It changes all the time, even if I don't do anything.
Are there any good "rules of thumb" to see if there is an memory leak?
...
The documentation doesn't say anything about that. When an old object is "removed" and a new one comes into it's place, then what happens with the old one? Do I have to release it by myself?
...
I've used instruments for searching for memory leaks. I did that through XCode Run > Start with performance tool > Leaks. Then I quit Instruments. And every time I Build&Go, Instruments automatically launches. Although that's cool, when just wanting to test the app, it's not needed.
How can I turn that off?
...
I have 12 views which I rotate almost similar to the icons in the home screen when going into homescreen-customization-mode by touching an icon for a few seconds.
I use a 3D transformation code to do the rotations. They have each a duration of just 0.02 seconds, and the angle and direction of rotation changes permanently upon accelerati...
For 3D space, I use:
self.layer.transform = CATransform3DIdentity;
what corresponds here if I just need 2d space and want to assign the identity transform? I knew there was something, but I can't find it anymore.
...
I've been reading that by default there is an -mthumb compiler flag which reduces code size by 35%. However, in a floating-point calculation intensive app like mine, this is not an good option, like apple says. I'd like to try it out if it changes anything.
...
I have an UIScrollView that contains some UIImageViews which are animated. It really only looks cool if there's a minimum scrolling speed happening. But when the user slowly scrolls and lifts the finger, the UIScrollView decelerates very slowly.
The problem is, that the scrollViewDidScroll method doesn't get called upon every offset cha...
I have seen code that calls initWithFrame of a UIView subclass (such as UILabel) with CGRectZero and things seem to work fine. What does it mean to instantiate a UIView subclass with a 2D point (which seems to be what CGRectZero is)?
...
correct example:
- (void)dealloc {
[viewController release];
[window release];
[super dealloc];
}
wrong example:
- (void)dealloc {
[super dealloc];
[viewController release];
[window release];
}
Althoug in alsmost all other cases when overriding a method I would first call the super's method implementation, i...
I've choosen the "view-based" application template in Xcode. The myProjectViewController.m has the following code:
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/
That sounds good. But: The template generated a myProjectViewController.xib file. What I dont get is: How ...
I haven't tried that yet, but I assume that I would have to disable scrolling of the parent scroll view as soon as I know that the user will want to scroll in the child scroll view, right?
Both scroll views are scrolling horizontal.
How could I disable scrolling detection of the parent temporarily? Or is there some other way?
...
In short: I want to have two fullscreen views, where I can switch between view A and view B. I know I could just use an Tab Bar Controller, but I dont want to. I want to see how this is done by hand, for learning what's going on under the hood.
I have an UIViewController that acts as an root controller:
@interface MyRootController : UI...
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 would like to my object to receive notification with the DeviceToken becomes available. Is there a way to delegate only certain functions from the UIApplication to my class?
Update:
I'm not so much interested in accessing it from the application delegate, I already have an application delegate, but want to respond to the event via c...
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 ...
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...
I want to connect MySQl database with my iphone application.Read, write, save some data into the database.How can i do this.
...