iphone

Objective C - Iphone. How can I show the numeric keyboard by default?

Hello, I'm trying the following with no luck. When the user click on a UiTextfield i need to change the keyboard view to the numeric view automatically, is this possible? Thanks in advance. ...

UIScrollView scroll detection

I have a UIScrollView in a UIViewController view that scrolls horizontally. How can I detect whether the scroll is at the left end or right end or somewhere in the middle? ...

iPhone: How to send httprequest via button?

There is 1 button on a view screen, when the user clicks the button a httprequest is sent to http://domain.com/buttoninput.php?id=1 Thats it! Nothing is loaded on the screen! the page is only loaded in the background. ...

Help: TCL error in Iphone Application

Hello! I compile Tux Racer World Challenger application! But I got a problem with TCL. In some file of this application include: #include TCL_HEADER But when I compile I get error: fatal error: 'tcl.h' file not found I have added libtcl8.5.dylib in to my project. I'm using Xcode 3.2.3 Please help me! ...

iPhone: How can I add a currency symbol, decimal point and decimal places in shouldChangeCharactersInRange

I've found the code below, which I'm trying to make work in the UITableView shouldChangeCharactersInRange event. Without the currency symbol it works fine. When I try to add the currency symbol, it just allows me to enter one number. What it should do is this, say I enter 7536, it should appear in the following steps £0.07, £0.75, £7.53...

How to store CLLocation using Core Data (iPhone)?

Hi, I'm trying to save a location and retrieve the location on a map afterward using Core Location, MapKit and Core Data frameworks. What I've done is I just made entity named POI and added properties such as latitude (double type), longitude (double type) with few others. Simply put, my app saves POI with two NSNumbers. (lat and l...

Reloading UITableViewCell when changing orientation

Hi all, In my iphone app, im using a UITableView with each row containing 3 photos, and they are separated by a space = 50.0 pixels. When I change t landscape mode, I want this space to increase to 100.0 , but I cant achieve this. In the orientationChanged method, I specified that I want the space to be 50 in portrait and 100 in Landsc...

Incorrect frame size/orientation after switching from UINavigationController to a UISplitViewController

Hi, I am trying to use a UISplitViewController for only one tab in my application (the others are using a Navigation Controller and different ViewControllers). I have added the SplitViewController in the MainWindow.xib (the only way I could get it to work) but I don't add it to the window when didFinishLaunchingWithOptions is called as...

How to output NSDate with defaulttimezone?

How can I output the current date and time with the defaulttimezone? When I use following code I always get the time in GMT. Is it possible to convert NSDate to the defaulttimezone? I can’t use the NSDateFormatter because I need an NSDate Object with the correct time. NSDate *date = [NSDate date]; NSLog(@"Time: %@", date); Output: 201...

Difference between code signing target and project

I noticed that in Xcode I can set the Entitlements and Code signing settings both on: the Project (double click on the top item in Groups & File, which has the name of the project) the Target (under Targets, double click on your project name). What's the difference between these two? I know that with header paths, one tends to overr...

Inserting a Background Image using Quartz2d and Context ?

Hi all, I have written a game using Quartz2d. I would like a insert a background image to the game. I have tried doing this using the view.insertSubView method however the background image is always placed on top of the other sprites. Even using sendSubviewToBack does not solve this. I assume I need to somehow draw the background image ...

help with adding an url href

hello, i am confused about how i can add a link to the following code onReady: function() { new Ext.TabPanel({ fullscreen: true, type: 'dark', sortable: true, items: [{ title: 'Tab 1', html: '1', cls: 'card1' to be able to directly load a url when i click the...

Strange NSNotificationCenter crash

Hey Guys, I've another problem. This time with NSNotificationCenter. Now it crashes, but a few days ago, when I added the Notification, it worked properly. In the time between I added some code that has nothing to do with that... I have about 10x10 tiles. Each tile adds itself as an observer as soon as it is created: [[NSNotificationC...

When programming iOS ViewControllers should you call parent class methods before or after your own code?

A new iOS ViewControllers created from a template contains several "boilerplate" methods that call their parent class methods. -(void) viewDidLoad { [super viewDidLoad]; } - (void) viewDidUnload { [super viewDidUnload]; } - (void) dealloc { [super dealloc]; } When modify these classes, should I put my own cod...

NSScanner not importing data

I'm trying to load a default set of data from a csv file into my core data db. So initially i'm trying to read in a csv file and output it to the log before trying to add it to the core data database. This is the code i'm using; //Find import file; NSString *defaultCSVPath = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"csv"...

iPhone dev mail, contacts, calendar settings

Hi, I need to access a "Sort Order" and "Display Order" preferences under Settings -> Mail, Contacts, Calendar. Is there any example how to do that? Thank you /Alex ...

How to add an CALayer or UIImageView using different blending modes like screen, multiply, darken, lighten, color dodge, color burn, etc.?

I remember there are such blending modes available, but couldn't find how to do it in the CALayer docs. Does anyone know the trick? ...

searching in large amount of info in a single file on iphone

Hi all, I wanna store a list of people while each person has some pieces of info associated with him. for example location and phone number and e-mail address. i wanna store in this list around 10,000 persons. After that i want to search this list dynamically (after typing each letter , the database is searched for new matches to the st...

Read/Write to a plist file that comes bundled with the app

Hi I am building an add-on to my app where the user can search for an item in a list that is pre-populated with data from a .plist file. It is an NSDictionary. If the term, the user searched for, does not exist, the user can tap a + button and add it so it is there the next time. First of I thought it would be as easy as using the NSUs...

Input type only with numbers

Hi, I made a form that works only with numbers, and I want alert the user when he type letters which are invalid alert he and delete the caracther or make the input box red ..., how can I make that? ...