iphone

How do I disable selectRowAtIndexPath when subview is visible

I am writing a "tweetie 2" like swipe functionality, but have run into what I hope is the last stumbling block. When a user swipes across a table row the "controls" view animates as expected, but when the row is selectd, didSelectRowAtIndexPath is fired off. The desired result is for when the "controls" view is visible to disable the d...

I am trying to add a drop shadow to a UImageView

I am trying to add a drop shadow to a UIImage view. I get a shadow but it is clipped to the edges of the image view and I am not sure why since I correctly set the uiimageview.clipsToBounds to NO. Below is the code: -(void)addShadow { UIGraphicsBeginImageContext(self.frame.size); CGContextRef myContext = UIGraphicsGetCurrentConte...

Objective-C: [sectionInfo name] of NSFetchedResultsSectionInfo needs to be dateFormatted

Hi guys, I have the following code: -(NSString *)tableView:(UITableView *)table titleForHeaderInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[fetchedResultsController sections] objectAtIndex:section]; NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDat...

Howto use UITextField's drawTextInRect: method

Hi, I have a UITextField with a custom background, but now i want to change the text's position, so i have to use drawTextInRect:, but i can't figure out how to use it. The documentation says: You should not call this method directly. If you want to customize the drawing behavior for the text, you can override this method to do your dr...

Distinguishing between didSelectRowAtIndexPath and accessoryButtonTappedForRowWithIndexPath

I've implemented didSelectRowAtIndexPath and accessoryButtonTappedForRowWithIndexPath never seems to fire. However, didSelectRowAtIndexPath always fires, even when I click the accessory. Shouldn't these two be exclusive? ...

Multiple images per row in UITableView's cell

Is there any sample code that would illustrate how to have multiple images within each row? Typical apps show a thumbnail to the left side with text to the right. I'd like to do that plus an image to the right of the text. How would I go about doing this? ...

How do I stroke a CGContext path with multiple random images

I want to stroke a CGContext path using three or four images, but randomly cycle through the images as I'm drawing the path. I want to draw the images INSTEAD!! of drawing the CGContext I am now. I have this code so far - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPo...

iPhone Obj-C Properties

Hi, I'm a beginner following a book for creating iPhone apps. One of the steps was writing "UISwitch *whichSwitch = whichSwitch.isOn;" and I was just curious as to where "isOn" came from? In the documentation: on A Boolean value that determines the off/on state of the switch. @property(nonatomic, getter=isOn) BOOL on What does that...

What is kShowSegmentIndex?

-(IBAction)toggleShowHide: (id)sender { UISegmentedControl *segmentControl = (UISegmentedControl *)sender; NSInteger segment = segmentedControl.selectedSegmentIndex; if(segment==kShowSegmentIndex) [switchView setHidden:NO]; else [switchView setHidden:YES]; } ...

How to use UIScrollView to switch between UIViews

How would I build multiple UIViews with multiple subviews and switch between them using a UIScrollView? I would appreciate anyone who can upload some code. I am a complete noob withe the iPhone. ...

NSMutableArray Description Method - Array of Arrays

I have an Array that contains array objects. An array of Arrays. When I apply the description method to the Array, I don't see the data in the inner arrays. Here is the code: [runScoreDataArray addObject:[NSString stringWithString:currentUser]]; [runScoreDataArray addObject:[NSNumber numberWithDouble:mainScores.scoreTotal]]; NSLog(@"Ar...

iPhone APNS Sandbox vs. Production for not yet approved apps

Is it true that the production APNS is unavailable until an app is approved to the app store? I can use the sandbox certificates fine, but production yields no results. ...

Is sscanf thread-safe on iPhone OS 3.1.2 ?

I was just spending my whole day debugging a random bug when i finally realized the Problem was sscanf being called from multiple threads. I confirmed by running the following code which works as expected on Snow Leopard but produces very strange results on my iphone with os 3.1.2. It also works fine in the Simulator. On the iPhone the...

iPhone. I need to touch every fullscreen pixel at 30fps. Doable?

I am interested in doing some image-hacking apps. To get a better sense of expected performance can someone give me some idea of the overhead of touching each pixel at fullscreen resolution? Typical use case: The use pulls a photo out of the Photo Album, selects a visual effect and - unlike a Photoshop filter - gestural manipulation of ...

Error when using mailto: link in Mobile Safari in app-capable mode

I've got a form in a web page with an action that is "mailto:email" (where email is a real email address). When I load this page in Mobile Safari in regular mode (ie, not launched from home screen with app-capable mode), this works fine - after I submit the form, the email app comes up. However, when I'm in app-capable mode and have lau...

iPhone APNS Device Tokens in sandbox vs. production

How do device tokens vary from sandbox to production modes? I think I have locked up some device tokens into a production mode, and they can't be pushed to from development. Any ideas on how I can check? ...

Function with argument to a NSInvocation method

Hi, I have a controller view who is using thoses 2 functions: [appDelegate getFichesInfo:[[self.fichesCategory idModuleFiche] intValue] ]; //first function self.fiche = (Fiche *)[appDelegate.fichesInfo objectAtIndex:0]; [appDelegate getFichesVisuels:[[self.fiche idFiche] intValue] ]; //second function not working self.fiche = (Fich...

Copying data from Field Test Mode

I'd like to copy out some data from the iPhone field test mode. Is there any way to do it? I'm using the data for testing, so it's not necessary to require App Store approval. ...

how to load and launch .app file in iPhone?

hello, How to load and launch .app executable of other project in my project without URL based? ...

what is equivalent to Java packages in iPhone OS?

hello, I want to know which is the equivalent concept of Java packages in iPhone. Is it bundling or Static library? ...