iphone

accessoryType Checkmark indents UITableViewCell to the left

Hi there! When i select a cell in my tableview, the cell was pushed to the left by the accessoryTypeCheckMark. my custom cell was programmatically inserted into a tableview - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath: ...

Landscape for just on view in a Tab Bar Based application

Hi all ! So i've search a lot but nothing real close to want i want. I have a Tab Bar based app within i have made a custom Tab Bar controller where i have implement the should autorate method. So when the device rotate the tab bar rotate and the view associated with the item selected. What i want is to set one view only in landscape...

iPhone SDK Point to a specific location

Hi, I'm trying to develop an application that use the GPS and Compass of the iPhone in order to point some sort of pointer to a specific location (like the compass always point to the North). The location is fixed and I always need the pointer to point to that specific location no matter where the user is located. I have the Lat/Long coo...

Create a UIBarButtonItem with a title, and an image, and the default background

I am trying to create a UIBarButtonItem that looks like the normal Apple ones, but I'd like to include an image and a piece of text. As far as I can tell, you can't specify both an image and a title (the image shows but the title doesn't if you set both). Also, if you use a customView, then you lose the BarButtonItem look and feel. Wh...

Breaking NSString into lines (to fit desired width)

I'm trying to get a NSString broken into lines to fit a desired width (as it would happen inside sizeWithFont:constrainedToSize:). Is there a better way to do this than guessing where the breaks would happen in sizeWithFont? ...

Ideas for toy projects with which to familiarize oneself with Cocoa and Cocoa Touch

[Distilled from this question, with less informality.] What are some things a new Cocoa programmer should write as sample projects, outside of the hand-holding of a tutorial? Let's have one project idea per answer. If you have multiple ideas to suggest, post multiple answers. It'll help for you to also list what Cocoa concepts your pr...

How secure is it to connect to an ftp server (iPhone SDK)

How secure is it to connect to an ftp server in an iPhone application? I want to connect to my ftp server in my app but am worried that the username and password can be revealed. ...

How to launch an app in debug mode from xcode with a URL

Is there a way for xcode to launch an application with an app URL? I've read the answer to this question http://stackoverflow.com/questions/1239000/debugging-app-when-launched-by-push-notification, and it works great for single tests. I'm trying to write unit tests for launching the app with lots of different URLs, and using the previo...

Parse NSURL path and query (iphoneOS)

Are there any standard objects or functions to parse an NSURL's components? Clearly I could write one, but why re-invent the wheel? [NSURL path] will return an NSString like "argX=x&argY=y&argZ=z" What I would rather get back is a dictionary populated with {@"argX" => @"x", @"argY" => @"y", @"argZ" = @"z"} For the path, which returns ...

Can you change the sensitivity of UIScrollView scrolling?

Using the Apple's PageControl sample code I've managed to put several UIWebViews side-by-side, and I'm able to swipe left and right in order to get to each web view. I can also scroll up/down to scroll within each web view. However, I have to move my finger very precisely along the y-axis to get the webview to scroll up/down - otherwise...

Fast way to convert array of points into triangle strip?

I have an array of CGPoints (basic struct with two floats: x and y). I want to use OpenGL ES to draw a textured curve using these points. I can do this fine with just two points, but it gets harder when I need to make a line from several points. Currently I draw a line horizontally, calculate its angle from the points given, and then ro...

Second view in IB

I'm writing a game, in which I will be swapping out views. I have a loading screen which comes out in LandscapeRight mode, which is what I want. Then I want all subsequent views to load in Landscape. What ends up happening is that they load in Portrait (even though in IB I have them edited as Landscape views and the size dimensions ar...

principal class of NSBundle...

hello, Plz help me to understand what is principalClass used for?what is the syntax of it. i understand tat it is in NSBundle Class,but can we create it for any bundles of is it specific only for laodable bundles? plz help me to know the concept of principalClass. Thanking You. ...

Can i play video in portrait mode?

Can anybody explain me how to play video in portrait mode in iphone device. It will be very helpful to if you provide some sample code for referance. Thanks in advance. ...

Deselecting a UITableViewCell upon cancelling an ActionSheet

Using -didSelectRowAtIndexPath on a UITableViewCell, I fire off a UIActionSheet and the cell becomes selected. How would I target the specific cell to animate it's deselection upon the action sheet being sent a Cancel message? ...

Changing my CALayer's anchorPoint moves the view

I want to alter the anchorPoint, but keep the view in the same place. I've tried NSLog-ing self.layer.position and self.center and they both stay the same regardless of changes to the anchorPoint. Yet my view moves! Any tips on how to do this? self.layer.anchorPoint = CGPointMake(0.5, 0.5); NSLog(@"center point: %f %f", self.layer.posi...

How to get subString of a page of a long NSString, font size variable?

I have a very long text, I defined it as NSString, so I need paging, there will be different paging for different fonts, say I'd like to display one page on a multiple line UILabel. So at frist I need to get substring of page by page of the long string. Does anyone know good solution for this? Thanks in advance. I know there is a NSStr...

Youtube video data retrieval

I want to get number of views, duration and also the rating of the particular video in youtube. Is there any way to get the information of the video by passing the video id through URL? ...

How do I change the UITextField so it looks like the Search Text Field?

I would like to change the standard iPhone UITextField so that it looks exactly like the search text field within the UISearchBar. You can see an example of this for the SMS text entry field within the iPhone Messages application. I do not believe that the UITextField has a style property that will meet this requirement. Any ideas? ...

Regarding crashing on iphone 3.0

Hi all My appliction is running fine of iphne 2.2 but on iphone 3.0 its crashing below is the trace coming. Please help me. I am loading tab bar after viewappear. #0 0x30010cb2 in _cache_malloc () #1 0x30010b2e in _cache_fill () #2 0x30010a68 in log_and_fill_cache () #3 0x30010676 in _class_lookupMethodAndLoadCache () #4 0x300102fa...