iphone

Adding a button to last UITableView row

I'm developing an app where the user can choose between a number of included songs. I also want the user to be able to choose a song from his/her iPod Library. Currently the song is choosen by selecting it in a UITableView. So I figure I would like to add a new row at the end of the table and make it a button that will fire a MPMediaPic...

How can I see on my iPhone the rails app is running on my mac via Passenger

Hi there, I'm developing a rails app, now I'm working on the CSS specifically for iPhone, on my mac. I've my app running via Passenger at http://whatever.local It'd be nice to access via iPhone to the same URL so I can test my CSS quickly. But how? Thank you, Leo ...

Error when trying to deleting a file that exist

A tester said that he got this message only once, and I can't seem to reproduce it or figure out how this message appeared. In a nut shell, my application starts a background thread and grabs data from our server. Once we are done downloading the data we store it in an xml file, so we can grab the data from this file incase we shutdown ...

click and drag not working on iphone

Check the url http://bit.ly/bN6EFH Its working fine in all browsers but when i run this in iphone safari, it does not work correctly. Its just a javascript code that finds click and drag event. Using click n drag i am changing images. Please click n drag images. I need some special code for making this work in iphone safari? ...

Entitlements.plist Not Right

When I generate an Entitlements.plist the contents are like this <key>application-identifier</key> <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string> <key>keychain-access-groups</key> <array> <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string> </array> Instead of being like this <?xml version...

nsmutabledictionnary with nsmutablestring forkey

I have a nsmutabledictionnary, and when I use setObject:forKey: with a nsstring key it works when I try objectForKey, but if I put a nsmutablestring in the key argument of the SetObject:forKey: method, it's not work when I call objectForKey, it return the last object in the dictionnary... sorry for my english I do my best... Alex ...

iPhone - UIButton to select tab in different view

Hi All, Fairly new to iPhone app development, so this might be really obvious (if so, apologies in advance!) I'm building an app which has a tab bar. However, when the app first runs and 'launch screen' is shown with 3 UIButtons - each of these buttons points at a view of one of the tabs. What I need to do is: Close the existing view ...

iphone redirect shell command

I am working on an jail broken iphone app that calls a shell command. To read the output I redirect the output of the command to file. That is where my problem lies. When I attempt to do the redirect sh reports that the operation is not permitted.this is the exact output of gdb: sh: ./tmp/tmp.out: Operation not permitted Also I call my c...

iphone: How to do kCATransitionPush without any fade??

I want an animation of push between two sub views, just like ScrollView paging mode. I know I can use UIScrollView directly, but the logic there is not so same with my program. Anyway, I can use kCATransitionPush animation, but the bad thing of that is it does fading while pushing. I really hate that fading, can anyone pls tell me ho...

Can i Implement admob for a app running in iphone OS 4?

Hello, I am creating an universal app.The app should be able to run properly in i-pad ,iPhone 4.0 OS and also in iPhone OS with versions more than 3.0 .I want to implement a banner in my application.In my case using iAd or AdMob should i create the banner.please guide me.Since i am creating universal app i don't know the proper way of a...

autoresizingMask for fixed margin sizes

In a view containing several subviews, one of the subviews should remain a fixed, non-zero distance from the top and bottom of the superview. In these images, this view is shown in gray: According to the documentation, this view should have a mask of UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth. However, this c...

iPhone GameKit asynchronous server pattern

What is the best way to implement a server piece of application using iOS GameKit? Should I create a separate server thread that somehow responds to all delegated events (data received etc)? Or maybe use NSRunLoops? ...

Adding Object NSMutableArray with ForEach Loop

Hello, here is what i am trying to do: NSMutableArray *objectNames = [[NSMutableArray alloc] init]; for (Object *o in objectList){ if (![objectNames containsObject:o.name]) { [objectNames addObject:o.name]; } } I am trying to go through an array of objects, then take the objects name (a string) and add it to a string a...

How to use a pre-populated database on a coredata context

Hi all, this is my first question here. Well, I am developing an iPhone application that will use coredata, but the theres not going to be an option to insert data into the database of the app. I want to know how to pre-populate it's database. I thought of creating a plist with all the info and make a function to put it all into the c...

TableView help pushing a custom view

Hello again, So I am trying to simple traverse to the next level of a table view by doing this: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.row == 1) { FiltersController *aFiltersCont = [[FiltersController alloc] init]; aFiltersCont.displayedFilters = [appD...

How do I set the right margin of a UITextView?

I have a vertically-scrolling UITextView that fills the width of the screen. I need the text view to have margins (contentInset) of 20 pixels on the left and the right. But for some reason, I can't get the right-hand margin to work, either in Interface Builder or in XCode. The reason I can't just make the text view narrower is because I...

Custom back button in UINavigationController

For an application I'm developing, I need to display a custom back button in a navigation bar. I have the button asset as a PNG image, and I'm writing this code: - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; backButton.frame = CGR...

Hit target on UIToolbar with custom-image buttons is not correct

I have a UIToolbar that I've customized with my own background image. Consequently, the built-in UIBarButtonItem appearance doesn't work for me, so I'm using images that are already prepared to show in the bar. I create a custom button item with this method: + (UIBarButtonItem *)customWithImage:(UIImage *)image enabled:(BOOL)enabled tar...

IPhone App Settings: Settings.bundle vs plist file?

Hi, I'm a bit confused. I'd like to implement some simple settings for my app. I was thinking of just creating a simple plist file. But now I see that there's something called "Settings.bundle" (that also has a plist in there but some other stuff too). What I'm wondering, which one should I use? (I'm looking for the easiest way) Than...

designMode or contentEditable on mobile safari

I'm trying to make an iframe editable in mobile safari. Works fine in all browsers (including safari) with both contentEditable and designMode=on, but on mobile safari i can't get any of them working. Is there a way to make it work on mobile safari? ...