iphone

iphone, addSubview show view too high up, how do I move to down ?

I'm using addSubView twice in my app and both times it adds the view too high up the view, its off the screen at the top. See below... I have load the views like this as I nothing else works, cause me problems. I just don't understand why they are showing off the screen? What do I need to do to fix this ? - (BOOL)application:(UIAppl...

increasing the height of custom cell

Hi, I am working on a custom tableviewcell and trying to increase its height. I dont want to do it from my viewcontroller. Can someone please help me? Thanks ...

How to create a list of directory and import images to them

Hello guys, As you knew, a iphone app has 4 directories: Application folder, Document, Library, tmp. When app is installed in the first time, I want to: Create a list of directories in Document folder Import a list of images to each that directories. I searched and found the way to create directory in Document folder by code. [[NS...

UILabel with two different color text

Hi, how can i have a UILabel with two different colors for the font. I will have text in two different strings and i want to make text with first string as red and second as green. The length of both the string is variable. Thanks in advance ...

gap between UITableViewCell

Hi I need to place small gap between UITableViewCell, is there way that I can archive this? thanks Regards sam. ...

How to handle returned null from SQLite

Hi all, I am using this in a method: + (void) getA:(NSString *)dbPath { if (sqlite3_open([dbPath UTF8String], &database) == SQLITE_OK) { const char *sql = "select a from a_table"; sqlite3_stmt *selectstmt; if(sqlite3_prepare_v2(database, sql, -1, &selectstmt, NULL) == SQLITE_OK) { while(sqlite3_...

Hit test on group on Subviews

I have a UIView as the container/holder view. Inside that i have a group of UIViews (icons) Think of this as similar to the iPhone's SpringBoard- you have an SBIconList (UIView subclass) with a group of SBIcons (also UIView subclasses) So far, each icon of my icons is draggable, but i'm having problems writing the collision detection c...

Device-Specific Resources in iPhone

According to the iOS Reference Library: In iOS 4.0 and later, it is possible to mark individual resource files as usable only on a specific type of device. Does this mean that if you're creating an Universal app for 3.X devices, and the 3.2 iPad in particular, you can't use device-specific resources with the ~ipad and ~iphone...

iPhone, addSubView doesn't call willViewAppear ?

I'm adding a view with addSubView I'm also using the view elsewhere and presentModalViewController. viewWillAppear is called with presentModalViewController but not with addSubView. No doubt this is something obvious ? ...

make an uisegmentedcontrol in an uisrollview

Hi,I want to use a very large segmentedcontrol component so i had the idea to make it in a uiscrollview ..so by scrolling horizontally user can choose the appropriate item . i wrote this code: CGRect rect = [[UIScreen mainScreen] applicationFrame]; CGRect frame = CGRectMake(rect.origin.x + kLeftMargin, rect.size.height - kPale...

How to find the long and lat of a city on the iphone?

Hi, I am trying to find the long and lat of a city on the iphone. Say the user is searching for London, I would call some function that would retrieve the long and lat of London. I have looked on the web and found you can use a Google API but there must be an Apple function somewhere to handle this? I have come accross the MKReverseGeoc...

What's the proper way to read/write to a plist?

In my app I store some user data in two .plist files which already contain some data, but the user can change it. NSString *Path = [[NSBundle mainBundle] bundlePath]; NSString *DataPath = [Path stringByAppendingPathComponent:@"Settings.plist"]; NSMutableDictionary *tempDict = [[NSMutableDictionary alloc] initWithContentsOfFile:DataPa...

Change toolbar icon dynamically with bundled icon

Hi, I'm using a toolbar in an UIWebview. I want to able to change an icon dynamically. That is from stop to refresh. How can i used the bundled icons? [stopButtonItem setImage:[UIImage imageNamed:@"refresh"]]; Thank you Teo ...

Problem with UIActionSheet and iPad keyboard

Hi , i have problem with UIACtionSheet and iPad keyboard , when try to show an UIActionSheet with firstResponder keyboard my sheet becomes like this : what is the problem ? ...

drawing a freehand line on in UIView...

Can anyone share sample code to draw a free hand line (similar to one in many drawing/sketching applications on iPhone/iPad) on the iPhone( in UIView ). I've been trying to do this but only success had so far is to be able to draw a straight line from point a to point b. ...

viewWillAppear is never called, till I load a modal view controller in the of the view, after that viewWillAppear is behaving as we expect!

I noticed that this problem discussed elsewhere, and I've tried a number of solutions such as adding: - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [viewController viewWillAppear:animated]; } Another solution is ...

develop iphone application - is the GUI HTML?

Hi I want to start developing IPhone application. I need to understand something about it - I am working with a graphic designer. If she supplies the GUI in HTML - will it be easy for me to develop with it? How does it work? like regular web development? ...

GameKit Framework not working on iPad

Hi have some problem with compiling GameKit framework on iPad , when xcode compiles my code , it takes me some error !!! i don't know what is it ? ...

Changing the tab bar title of the moreNavigationController from "More" to a custom

Hi there, is there a way to change the title in the tabbar of the moreNavigationController? It always shows "More". I tried it with setting the moreNavigationController.tabBarItem.title, unfortunately it seems to have to effect. Sincerely, Heinrich ...

excluding developer iAds from my apps

I want to exclude developer iAds from my apps, as I don't think the revenue is worth the annoyance to my users. I asked Apple about it, and they said there is no way to do this, and there are no plans to add one. However, I have to wonder if there is a keyword in the exclusions that will do the trick. Has anyone found such a keyword...