iphone

Play video in UIWebView from NSData

Hello there, Does anybody know how to play a video in a UIVebView ? The video comes from the iphone library, when I pick it, I store it in core data as binary data. If i use the local url of the video it's working fine, the problem I have is that the this url refers to a folder named "tmp", and I don't know the lifetime of it. If I ca...

Array passing between classes, gone?

Hey guys . i have two classes, SelectionScreenTable & GraphView. In the SelectionScreenTable class .h, i declared a NSMutableArray called usagedatas NSMutableArray *usagedatas; } @property (nonatomic, retain) NSMutableArray *usagedatas; In the SelectionScreenTable class.m i remembered to @synthesize. Later on, while processing m...

set title of tab bars programmatically

HI all how can we set titles of tab bars programmatically. i have five tabs in my main window.But i hvnt created it programmatically. what should i do ? how to give title through code? regards shishir ...

UIApplicationWillResignActiveNotification, how to know the interrupt source?

I'm writing a camera app. I'd like to know if the app is interrupted by SMS event or screen lock. I'd tried to inspect the NSNotification. Both the object and userInfo field give no hint. ...

Can we make the 1st tab not to be selected when we are launching a tab based applicaion?

Usually when a tab based app is launched, automatically control goes to the 1st tab. Is there any way such that the 1st tab's view will be shown but without the 1st tab being selected? ...

fetch data from sqlite as an integer using iPhone

hi.. How can i fetch the data from sqlite as an integer in iphone technology. I have fetched the data as a string that code is mentioned below,now what have to chage in this code by which i can fetch the data as an integer. Please help me out. databaseName = @"KNAJ.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(...

...

    how to get the rate(top/ps) of cpu and the usage of memory?

    Can i do that? or It's a private API? ...

    PHP script to process NSURLRequest from iphone

    Hi, i will be sending a POST request to login.php on my server from an iphone app over HTTPS. The POST is created using NSMutableURLRequest. Is there an example of a PHP script to process this POST on my server. The POST isn't sent as a form as such , anyway not that i think it is. Not sure how NSMutableURLRequest formats this. I just...

    How can i see if dealloc is being called on a uikit object, or any object not created by myself

    I think i have an UIImage that has a higher retain count than it should have and i am probably leaking memory. I use this image as a thumbnail, to set a custom background to a uibutton. So the uibutton is holding a reference to it and so do i. But instead of 2, the retainCount is 3. Do i have to create a custom UIImage derived class and ...

    How to set html text as message body on 'TTMessageController' Layout.

    Hi All, I am using 'TTMessageController' for composing mail.I want to use this class for replying mail. How I set the html Text in message body on 'TTMessageController' Layout ? Thanks Deepika ...

    Variable height UIViews and labels

    Ok so I'm not in a table cell at this point. (I've seen a lot of threads regarding the height of cells.) I have a detail view with a title and description at the top of the view, followed by a tableView below it. If the description is going to vary in length, how do I get the tableView to adjust with it accordingly so it always starts d...

    Quick way to get an NSDictionary from an XML NSData representation?

    I've loaded an XML file as NSData into memory and parse over the elements using NSXMLParser. Although it works, it's a very ugly and hard to maintain code since there are about 150 different elements to parse. I know there are nice third-party solutions, but I want to keep it with the iPhone SDK for purpose of practice and fun. So I th...

    Crash on replacing map annotations

    Solved it, see below code I'm trying to replace annotations on my MapView depending on the distance between user location and annotation. The annotations are getting replaced like they should, but when I touch te mapview my app crashes. This is de code I have so far: NSMutableArray *tempArray = [[NSMutableArray alloc] init]; for (...

    how to change orientation of a particular portion of a View iPhone

    I would like to change orientation of lower half of my view similar to stock app in which when we change the orientation of device only the Graph view of the same rotates. Please let me know how I would achieve the same functionality. ...

    How to display HTML-like table data on iPhone?

    I have a set of data in a matrix which I would like to display in my iPhone app with all of the rows and columns intact. Everything I can find on the web dealing with "tables iPhone" gives me information on UITableView, which only lets you show a list of items to the user - not an actual table in the HTML sense. What's the best way on th...

    Advice using leaks in instruments for noobs

    Hello I am pretty new to iphone development. I have run my app for the first time using the "Leaks" from "Instruments". It shows me several leaks around 20 the smallest is 32 bytes and there is one with 1KB. I have followed the memory management guidelines, (i (think i) understand how and when to use release, not to use it when adding to...

    iphone media player app crashing for unsupported format files

    Hi, I'm using media player to play a video file after downloading from internet. if the video file is not of supported format, the whole app is crashing. How can I prevent this from crashing. How can I check whether the video file is supported by media player on iphone or not. Is there any notification for that? ...

    Objective-C: Cannot Change Value of Instance Variable Inside a Function

    Hello everyone, I cannot change the value of an instance variable inside a function. I have defined a class: // info.h #import <Foundation/Foundation.h> @interface NSMyObject : NSObject { NSInteger i; } -(void) setI:(NSInteger)v; @end #import "info.h" @implementation NSMyObject -(void) setI:(NSInteger)v ; { i=v; ...

    Localization not working

    I have an application that is supposed to be localized (two languages, english being the default). However, I seem to only get the English versions of all strings, regardless of what the system default language is. I am probably missing something trivial, but I've read several tutorials now without any solution. I added this line to ma...