iphone

NSFetchedResultsController index beyond bounds

I'm using an NSFetchedResultsController to display items in my table view: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section....

Is it slower to draw small sprites with large textures on iPhone?

I'm looking for ways to optimize opengl rendering in my iPhone game. I wonder if anyone has experience with the impact of texture size when it comes to rendering a sprite? For example, would a sprite rendered as a 100x100 pixels big rectangle render slower if it's texture source is 512x512 pixels rather than say 32x32 pixels? ...

Hide search box on iPhone

I have a search box, and a button. I want to slide the search box up and off screen to make a nice sliding effect for hiding/showing the search box when someone clicks the button. Is there a way to do this smoothly? ...

Playing music without opening iPod Library (MPMediaPicker)

if i have the title of a song thats in my iPod Library. Can i play it in my application without opening iPod Library (using MPMediaPickerController)? I can get the MPMediaItemPropertyPersistentID from the selected media item but how to play a sound for which i have MPMediaItemPropertyPersistentID? Any code snippet? ...

Iphone4 crashes ipod app

I created a sample application for the iPod and it works well. I checked it lots of times on the iPod. I installed that application onto the iPhone4. It doesn't work - it crashed several times. I dont know why. I have the latest iphone sdk, 3.2. (I use sqlite3 to store and retrive data) ...

xcode: following tutorial but 'subViewOneController' undeclared error

Hello, So I'm new to programming for the iPhone and I'm trying this new tutorial here: http://theappleblog.com/2009/04/15/iphone-dev-sessions-create-a-navigation-based-application/ When I build the project, under the: RootViewController.m I get a 'subViewOneController' undeclared error at the first line: // allocate a set of views an...

NSCFString objectAtIndex unrecognized selector sent to instance 0x5d52d70

I'm new to iPhone development, and been having a hard time trying to figure out why my table isn't working. It could be something with Core Data, I'm not sure. The viewDidLoad method works fine at the start, but when I try to scroll the table view, when a next row appears, I get the error: NSInvalidArgumentException', reason: '-[NSCFS...

UIAlert View-for yes/no condition

Hi friends,my app needs alert msg and if yes button pressed then one more alert msg and then i have to called a method.This is my code: -(IBAction)resetPressed:(id)sender { NSString *title= [NSString stringWithFormat:@"Warning"]; NSString *message = [NSString stringWithFormat:@"Are you sure you want to Reset"]; NSString *ok ...

Painting on UIImageView with better performance

Hello :-) I have a view in which I paint a dotted line when the user moves their finger across the screen of the iPad/iPhone. I draw the line between a point stored as LastLocation, and the point that is the CurrentLocation. The drawings are to be persistant on the screen. This happens every time the touchMoved event is fired, and ends...

picking and uploading the video for iphone 3g ios 4 .

Hi all , I want to upload a video from iPhone to a server somewhere. I have found this useful question here for uploading a video on the server from iPhone. The only problem here is picking the video. The code is using uiimagepickercontroller to pick up the video and I have a 3g phone which has not video in its photos app. I can't e...

Sending SMS in background from iPhone 4

Hi all, I am creating an application that sends and SMS while taping on a button. To implement this functionality I installed the iPhone SDK 4. Since it supports in app SMS. But when I tap on my button to send SMS the MessageUI view controller is displayed along with my custom SMS body. I dont want to display this screen, I just need to...

Playing a song with MPMediaItemPropertyPersistentID

Can i play a song, i know its MPMediaItemPropertyPersistentID? How can i create MediaItem from MPMediaItemPropertyPersistentID? ...

Is it possible to post two links with the iPhone Facebook API in the iPhone's view (facebook app)

I am using the facebook iphone api and trying to use facebook.stream.publish to send a post from my app. I would like to put two urls/links in the post but can't figure out how. Aside from the href property that accompanies the header, I tried using additional properties to add an additional link. This works fine when viewed from a we...

animating a custom CALayer property

Hi, I'm trying to define an abstract layer property, angle, based on the existing layer property position. Basically it describes the orientation of the layer from the center of a circle. I did like the following: @interface MenuItemLayer : CALayer @property CGFloat angle; @end @implementation MenuItemLayer + (BOOL)needsDisplayForKe...

What is Developer in the Settings App?

I updated my iPod touch to iOS4, and connected it to my Mac. I opened Xcode's Organizer, and clicked 'Use for development.' Since then, when I open te Settings App on my iPod, there is an extra section between 'Safari' and 'Nike+' called 'Developer' (it is not Safari's debugging console!). When I select it, the awesome navigation contro...

how to display images in custom size in uitable cell

hi all i my iphone applicaion image in right of table cell are extracted from xml feed. Know i want to display them in fix size can any body help me out. bellow is the code int blogEntryIndex1 = [indexPath indexAtPosition: [indexPath length] -1]; imgstring=[[blogEntries objectAtIndex: blogEntryIndex1] objectForKey: @"i...

How can I switch the iPhone's screen/backlight on/off in my App

My app needs to go to sleep and wake up after a user specified time interval. Using [UIApplication sharedApplication].idleTimerDisabled = YES; I'm ignoring the idle timer. For the "sleep-mode" I'm turning the view to all black and hide the status bar. Still there's the device's background-light. Is there a way to turn it off or hit a ...

Macro definition in cross-platform

When development various platforms(Android,iPhone,Mac,Windows and so on), it is necessary diverged processing(#ifdef/#endif) by depends on an platform definition. But, I don't know original definition in Mac/iPhone/Android.  Windows : WIN32 (Visual C++)  Mac : __MAC_NA(?) (XCode)  iPhone/iPad/iPod : __IPHONE_NA(?) (XCode)  Android :...

UITableView inside a UITableViewCell? What's the best design?

I've not found a answer to this question anywhere, but this seems like a typical problem: I am dynamically (from a xml file) creating a view to display "Questions" I take from the XML file. I am having problems to display multiple choice questions. I am trying following approach: Question 1 MultipleChoiceQuestion 2 --First Option --Seco...

table view is not responding to user taps after i added navigation tabbar to my main view

i am having navigation controller application my root view controller had table view ,i added a tabbar controller to my main.xib file how can i decrease size of my rootcontroller view so that i can add tab bar below to that ...