I have a block of code in my iOS app that fills an array with Core Data objects on a background thread, via NSOperationQueue, then notifies the UI on the main thread when it completes.
Everything has worked perfectly in iOS3. However, in my new iOS4 build, I started noticing an occasional bug where the UI never gets notified that the da...
I have a UIImageView that's being loaded from a NIB. I've hooked up a gesture recognizer to it to handle taps, but when I run the app, taps aren't being detected.
...
I have a UILabel that shows a character count as the user types into a textfield. Currently it is sitting behind a translucent UIToolbar. I would like the UILabel to be ontop of the UIToolbar. How can I accomplish this?
...
I want to change the color to red.
...
I'm working on an iPhone app which uses the Zbar library which is under the LGPL licence. What I'd like to know is what I need to give someone if they request a copy of the code under this licence for my iPhone app?
I've been told they are in the build folder and also that they are .o files. I've found some of those in the armv6 and arm...
I am using gesture recognizers:
Initialize in viewDidLoad:
UILongPressGestureRecognizer *longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
[self.view addGestureRecognizer:longPressRecognizer];
This is what longPress looks like:
- (void)longPress:(UILongPressGestureRecogni...
I'm trying to use the google translate api's to... well translate some text, but its behaving strangely. When my query (the text to be translated) contains no spaces, it works fine, however as soon as I introduce a space into the query, i get no results back. This is my code:
-(void)translateText:(NSString *)originalText {
//Constru...
I am presenting a UIActionSheet when a user double taps my cell:
Tap Recognition in Cell Init:
UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleDoubleTap:)];
[doubleTap setNumb...
For custom animations in my app, I can use the setAnimationDidStopSelector: method to respond to the event that an animation has finished. Is there a similar kind of mechanism for detecting that the animation has finished for a standard View Controller animation transition for pushes and pops?
(i.e. [self.navigationController pushView...
Okay, so I'm obviously a newbie, but I need some help passing a variable to another view. I'm using the Utility Template in Xcode.
I think I have everything linking properly (including the proper header files and whatnot). Just don't know the proper syntax. Here's what I'm trying:
NSDate *time =[flipsideViewController.datePicker date];...
Hi
I would like to get access to the area covered by a finger for each touch event on an IPad.
Every touch event will result in a coordinate pair X and Y independent of how big the finger and consequently the touch area is that triggered the event.
I was wondering if there is a way to get the area data which triggered the touch even...
I added some custom controls to a MPMoviePlayerController. Ths is explicitly written in the documentation that tis is possible:
You can add subviews to the view in this property. You might do this in cases where you want to display custom playback controls or add other custom content that is relevant to your application.
But this w...
I'm trying to call methods on the parent of my object by passing the parent in as property.
But i keep getting this error:
expected specifier-qualifier-list before 'Wheel'
@interface Car : NSObject {
Wheel *w;
}
- (void)doCarStuff;
@end
@implementation Car
- (id)init {
if((self = [super init])) {
//w = [[Wheel al...
Hi,
I registerd for the keyboard show event, and implemented the method like this :
-(void) KeyboardDidShow:(NSNotification*)notif{
if (KeyboardVisible)
{
NSLog(@"Keyboard is already visible");
return;
}
NSDictionary* info = [notif userInfo];
NSValue* value = [info objectForKey:UIKeyboardBoundsUserInfoKey];
CGSize keyboard...
I am just curious about the role that self plays within an object. I understand that writing [[self dataForTable] count] refers directly to the iVar contained in that object. But if you miss self off and directly specify the iVar [dataTable count] how does that differ, what are you protecting against by using self, is it just to uniquely...
Hi!
I want to display an imageview at different point (the points defined by random numbers).
So how can I create an imageview and set its position all programically?
sorry if its confusing i dont know how to explain it..
...
Hi all,
I have used sqlite database in some of my iphone applications but as you know it is a lot harder than other languages such as java and php to use database. Is there any way to use database easier !? I found a framework in sourceforge here : http://mysql-cocoa.sourceforge.net/ but I think it is not for cocoa-touch. Is there any ot...
I am detecting if the user has pressed down for 2 seconds:
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc]
initWithTarget:self
action:@selector(handleLongPress:)];
longPress.minimumPressDuration = 2.0;
...
When my user clicks on a cell I want the text to turn white:
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
lblName.textColor = [UIColor whiteColor];
lblTime.textColor = [UIColor whiteColor];
}
This works fine, but when the user selects another cell, the previ...
I'm working up a game in XCode, and I want to add a helper application that uses the main application's various classes to build the main application's data files.
Specifically:
The main application is a card game.
I want a helper app that uses the classes such as card.m while it creates the deck.xml files for the deck of custom cards t...