iphone

help with reading text body from a web page

Hi all ... when I use : NSString *myText = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerText"]; NSLog(@"my text -> %@",myText); I get all the JavaScript for the webView but what i want is to save the body text only from the web page so can any body help me with some codes or any ideas thanks ...

move cursor up/down in UITextView

Hi, The only public API I found allowed me only to move the cursor right/left using selectedRange property. Any workaround to perform that task up/down? Thanks ...

UITextField displays extra dot at the end of text

Hello, I saw a very strange issue with UITextField control. When typing in UITextField after typing a few characters when typing space characters it puts "." characters at the end of the string. Can anyone know possible solution for this?? Thanks, Jim. ...

Getting Images List using bundle

Hi all, I am using this code to get the list of Images in my project NSArray *pngPaths = [[NSBundle mainBundle] pathsForResourcesOfType:@"png" inDirectory:nil]; I dont want to get one image from the list can i add filter to it Thank You ...

gcc-4.2 failed with xcode 1

I have started learning opengl es. I downloaded code from the companion website, but I cannot compile any project. When I use simulator 4.0 as base SDK, I get the message /Developer/Platform/iPhoneSimulator/Platform/Developer/user/bin/gcc-4.2 failed with exit code 1. However, whet I use device 4.0 as base SDK, I am getting the message...

Draggable UIImgeView Rotation

I have a UIImageView object that I rotate with frame property and CFAffineTransformMakeRotate and then I want ot move it with moving origin of its frame, but my image moves and reshape strangly. @implementation TimberView - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { // Retrieve the touch point CGPoint pt = [[to...

google earth api for iphone

I need google earth api for my iPhone application can somebody just provide idea or link? ...

How to remove (pop) a view from OTHER view?

Hi, I have 2 views. One is the 'viewheader' and the other is the 'viewContent' (added as subview). 'viewContent' contains a TableView (based on UINavigationController) and the TableView can drill down to a DetailView (UIViewController). (see Image below) My Question is: How can I remove (pop) the DetailView, with a UIButton FROM the '...

Font size issue with iPhone

Hi all Im currently working on a mobile version of a website, everything is great, works fine on an iPhone, Blackberry and Android. I have one slight problem, not a big deal but still a little annoying. I have: <h1> tags set to 18px and bold <h2> tags set to 12px and bold <p> tags set to 12px and normal Now everything looks great on ...

How to load local HTML string in UIWebView nested in a customized UITableViewCell?

Hi guys, Is there anyway to achieve the above effect? I need to render HTML-table tags in UITableViewCells. And the UITableViewCells need to have variable height also. Have done a bit of research. Some say it will be very slow. But wonder if anyone can help out with this? ...

iPhone managedobject delete crashing.

Hi, I try to delete some managedobjects by calling in a for loop [managedObject delete]; and at of the loop, I call [managedObjectContext save:nil]; At the above line, the app crashes and goes nowhere from there. Any ideas? Thanks ...

UINavigation view with cancel button slide up

Hi I am building an app and I have the main UINavigation view. I wanted to build another section into it, so when you hit a button, a new UI NavigationVIew pops up from the bottom. And when you have looked at a few views you can hit the cancel button at the top and the UINavigationView slides down and you are back at the original page i...

display video in a frame in portrait mode using MPMediaPlayer

hey, i have a requirement where i need to display a video at the center of the iPhone screen inside a frame. Is there any way to do this using the basic MPMediaPlayer? I have seen that using the MPMediaPlayer causes the video to play full screen in a landscape mode... So, is there any way that this can be customized to suit my needs? Tha...

Iphone Auto fit to page

Hello Is there a way to get a page to auto fit to screen on rotation of an iPhone? When i rotate the iPhone to landscape the screen zooms in to a certain point of the page and doesnt fit the screen, therefore you have to scroll back out to view the content. Cheers ...

sqlite3 update row syntax

Hi all, From the sqlite3 docs it looks like I should be able to use the following syntax to update a row in a database on my iPhone: NSString *dbFile = [[NSBundle mainBundle] pathForResource:@"database" ofType:@"db"]; sqlite3 *database = NULL; if (sqlite3_open([dbFile UTF8String], sqlite3_exec(database, [sql UTF8String], MyCallba...

how to solve sorting problem

Hi I am new to iPhone. What I am doing is sorting the array of images; that array consists of 22 elements. I am writing the code for that: NSMutableArray *images2 = [[NSMutableArray alloc] initWithArray:images] int n=22; for (int i=0;i<n;i++){ for (int j=1;j<n-i;j++){ if(count[j-1]>count[j]){ int t = count[j-1] ...

To retrieve contact stored in facebook

Hii all, I just wanted to know how do I retrieve ones contacts from his facebook account in iphone programmatically. ...

Redraw or Reset table view header and/or footer

Is there a way other than [tableView reloadData] to refresh table header and/or footer? With respect to both: - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section; OR - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section; For example, I'm showing a small summary...

Determining Network Quality on the iPhone

I have looked at several variations on the Reachability example such as the Donoho change and erica saduns UIApplication extension, but none of these allow you to determine the quality of your 3g connection. Is there a programatic way to see signal strength and link quality? ...

Potential leask of an object, Biuld and Analyze, viewForHeaderInSection

Hi again, i've just mad Build and Analyze with my project on iphone, and i got warning from analyzer which i don't understand, this is my function: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; NSLog(@"user did select row ...