iphone

Pixel-Position of Cursor in UITextView

Hello, is there a way of getting the position (CGPoint) of the cursor (blinking bar) in an UITextView (preferable relative to its content). I don’t mean the location as an NSRange. I need something around: - (CGPoint)cursorPosition; It should be a non-private API way. Thanks, Raphael ...

Navigate to a SplitViewController

Hey all... I've been playing around with the iPad SDK looking for ways to improve my current iPhone app. I've got a couple place where I think the new "SplitView" would look pretty good. My question is if it's possible to navigate to a "SplitView" with my current navigation based application? Mainly I'm not sure how to push that SplitVi...

Selected UIButton disappears inside selected UITableViewCell

I have a table, I have cellForRowAtIndexPath delegate for it and I have instance of UITableViewCell being created inside that method, which I return. Somewhere in cellForRowAtIndexPath I also add UIButton to cell.contentView of that cell. It all works fine, until I select that cell with button in it. The cell changes color to blue (which...

[UITableViewController loadView] loaded the "PersonnalDetails" nib but didn't get a UITableView.

I am trying to load a new view with the following code - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { PersonnelDetails *detailViewController = [[PersonnelDetails alloc] initWithNibName:@"PersonnelDetails" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:deta...

Port iPhone application to Android

What is the most efficient way to port an iPhone app to Android? I know Apple doesn't like 3rd-party, non-Objective C platforms generating code for their platform ... but is there something out there that can take an iPhone app and convert it to Android friendly code? If not, how have folks out there been creating Android versions of t...

iPhone SDK / Objective C Syntax Question

To all, I was looking at the sample project from http://iphoneonrails.com/ and I saw they took the NSObject class and added methods to it for the SOAP calls. Their sample project can be downloaded from here http://iphoneonrails.com/downloads/objective_resource-1.01.zip. My question is related to my lack of knowledge on the following s...

@synchronized doesn't work in static library

For some reason, when I try to use @synchronized in a static library for the iPhone, I get an error in the project that uses it: Undefined symbols: "___restore_vfp_d8_d15_regs", referenced from: -[GVInbox addConversation:] in libGVKit.a(GVInbox.o) "___save_vfp_d8_d15_regs", referenced from: -[GVInbox addConversation:] in...

Display UIPickerView when UITextField is selected

Does anyone have a basic example to display a UIPickerView when a UITextField was selected. ...

Numbers Keyboard in Xcode

Hello, Does any one know how to show the numbers keyboard in the iphone rather than the default one? And is there a way to filter the textfield for numbers only? I need to do that from the code not from interface builder Thanks ...

Showing Master/Detail UITableView inside UIPopOverController

I have a UIPopOverController that shows a UIViewController with a UITableview in its view. The cells in the table have a detailedView, but whenever that view gets pushed, the PopOverController increases in size, and I am left with all this white space inside it. Question is this: Can anyone show me how I can have a Master/Detail UITable...

Looking for voice command code/library for obj-c/c

C/Obj-C Developers- I am looking for a way to listen for a specific word or small set of words to be spoken and fire an event. Needs to be able to run on the iPhone/iPad ... Looking for ideas? ...

Hiding/ Showing UIPickerView

I Have an a touchesEnded event that checks for when a UITextField is pressed. What I would like it to do is is hide/show a UIPickerView. How can this be done? - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [[event allTouches] anyObject]; if (CGRectContainsPoint([self.textField frame], [touch locationI...

how to get the http header in asynchronous request mode using ASIHHTTP

Hello everyone I hope to display the download file size by reading http header. I know there is way do this: ASIHTTPRequest request = [ASIHTTPRequest requestWithURL:url]; [request startSynchronous]; NSString poweredBy = [[request responseHeaders] objectForKey:@"X-Powered-By"]; NSString *contentType = [[request responseHeaders] objectF...

How do I draw a proper parallelogram that can be animated on iPhone?

I'm trying to do something very simple: I need some parallelograms in my program. These are attached to other objects, all of which are UIViews. It's important that I be able to animate these, since the objects they are attached to can also be animated. I've figured out how to use the transform in UIView/CALayer to do this, but the prob...

Grab SELECTED text on UITextView

Hello Everyone, How do I grab SELECTED/HIGHLIGHTED text on a UITextView. I already know how to do this on UIWebView using javascript. Now I am trying to figure it out for the UITextView. Thanks for your help. ...

How to handle float values in a plist

I'm reading in a plist from a web server, generated with some php. When I read that into an NSArray in my iphone app, and then spit the NSArray out with NSLog to check it out, I see that the float values are treated as strings. I would like the "distance" values to be treated as numeric and not strings. This plist is displayed in a ta...

NSFetchedResultsControllerDelegate in a second view controller (not firing?)

I am running into an issue similar to the one described here: http://stackoverflow.com/questions/1319940/nsfetchedresultscontrollerdelegate-not-firing (the delegate for my NSFetchedResultsControllerDelegate are not being called on my second view controller) I can't seem to get the proposed solutions to work. I have a main view that load...

Can I Programmatically Select Text in UITextView?

Hello everyone, I want to select Text on UITextView, similar to the default "Select" and "Select All" pop options we see when we tap. I want to the user the ability to do that from my custom menu. I played with selectedRange but that doesnt seem to do the trick. Any ideas? Thanks ...

Print a copy of my app in the iPhone Simulator?

Ok, I give up... what's the quickest way to print a hardcopy (paper) of my app running in the iPhone Simulator? ...

CAKeyframeAnimation - Examples

I have a a menu that is a CALayer that will slide across the screen to a given point. I want the effect where the menu will go a little past the point, then a little before the point, and then land on the point. I can move the menu by applying a transform, but I was hoping to get this bouncing effect to work. I was looking into CAKeyf...