Disable Magnifying Glass in UITextField
Is there a way to prevent the user from moving the cursor in a UITextField? I'd like it to stay at the end of the string. ...
Is there a way to prevent the user from moving the cursor in a UITextField? I'd like it to stay at the end of the string. ...
I have a view xib that contains an info button. I'm doing animation on the UIView by adding CALayer objects to the view's layer and animating these layers. I'm careful to place these layers behind the info button by moving their zPosition. The problem is that on a real iPod touch the info button does not show in the view, even though it'...
I have created an context like this (simplified): CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = CGBitmapContextCreate (bitmapData, pixWide, pixHeigh, 8, // bits per component bitmapBytesPerRow, colorSpace, kCGImageAlphaPremultipliedFirst); Now, when I try to extract the data for the fi...
I assume that the origin is on the bottom left, and the y-axis expands up, starting from 0. The x-axis expands to the right, starting from 0. I just ask because I get very weird results from my drawing code... want to make sure that I didn't get this part wrong. ...
I've written an method that does some graphics calculations. There, you can specify a start-direction like "from left", "from right", "from bottom", "from top". Now I don't want the user of my method to pass confusing values like 1, 2, 3 or 4 or even strings. Nothing like that. Instead, I would like to create constants like: kFromLeft,...
Hi everyone, I'm using a custom drawn UITableViewCell, including the same for the cell's accessoryView. My setup for the accessoryView happens by the way of something like this: UIImage *accessoryImage = [UIImage imageNamed:@"accessoryDisclosure.png"]; UIImageView *accImageView = [[UIImageView alloc] initWithImage:accessoryImage]; accI...
Do I need to release a Core Foundation objects to clear up memory? And if so, how? For example, in the code: ABAddressBookRef addressBook = ABAddressBookCreate(); CFArrayRef peopleArray = ABAddressBookCopyArrayOfAllPeople(addressBook); do I need to release peopleArray? What about addressBook? ...
Why is my table view blank? It was fine until I added "initWithStyle" Here is what it looks like: And here is what my code looks like: Here is my .h: #import <UIKit/UIKit.h> @interface TableViewController : UITableViewController { NSMutableArray *jokes; IBOutlet UITableView *jokeTableView; } @property (nonatomic, retain) NSM...
I'm concerned that this is impossible, because +setAnimationDelegate: of UIView is a class method. But maybe I am wrong with that? Background: The problem is, that I have many objects of the same class, and I want to implement a method which does some nice animations specially for that object. Those animations are a little complex and c...
I don't understand this: + (void)beginAnimations:(NSString *)animationID context:(void *)context (void *) ----> what kind of data can I provide here? ...
Is there some way when sending this message to specify that I rather have my selector performed after all pending UI events, if any? Ie. give my aterDelay timer a lower priority in the event queue. ...
It seems that you must use the TTThumbsViewController to accomplish this. However, in the example code, TTThumbsViewController is only ever used to manage a scrollview of thumbs. How do you configure it to display cells instead? _______Original Question_______ Has anyone used the Three20 source and made a tableview (not Fields)? I am ...
I have 5 cells in a tableview that are all custom. Meaning, I've created a xib with a tableviewcell and created a corresponding cellController. The xib has two labels named name and size. The user taps a row, triggering didSelectRowAtIndexPath. From there a timer is started. At some point the timer finishes. Here I need to assign te...
I have a image that rotates around a few times by random and then disappears. After it appears again, I want it to be in the original state. Not rotated. I would keep track of how many rotations I applied randomly and then calculate how many radians I have to re-do that. But I slightly remember from the big docs that there was some ident...
I'd like a UITextField to appear when a button is pressed. Unfortunately, I can't hide it in Interface Builder and then set the hidden property to NO later because "ibtool fails with exit code 5" if you try to hide a UITextField. I'll try to do this in code but wondering if I may be missing something or making a grave UI error by attem...
I tried it with this code in my UIScrollView-subclass: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"he/she touched me"); } I also made sure that in the initialization of my view, this gets called: self.userInteractionEnabled = YES; But when the scroll view doesn't move and i tap on my subview a few...
Which is right? This: NSArray* foo = [[NSArray alloc] initWithObjects:@"a", @"b", nil]; [bar performSelectorInBackground:@selector(baz:) withObject:foo]; - (void)baz:(NSArray*)foo { ... [foo release]; } Or: NSArray* foo = [[[NSArray alloc] initWithObjects:@"a", @"b", nil] autorelease]; [bar performSelectorInBackground:@selec...
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...