An application that I am developing retains several WebViews that are used to allow an embedded web browsing experience for some activities centralized around the application. The problem that I am having is that after several hours open and after a lot of use the views begin to build up memory. My understanding of the memory management ...
Hello,
I know this question as been asked over and over but it's still quite obscure to me, so I guess making an example with my code instead will probably be easier .
I know that you can use :
A global variable, ( not good practice ).
Use a delegate
Use a singleton
Say I've got this piece of code here in my first view controller h...
i modified the AVfoundation sample code from WWDC..
the stream is working great..
but when i play audio..using AVAudioPlayer the stream freezes. with out any error messages or anything
here is the AVAdudioPlayer code..
audioPlayer = [[AVAudioPlayer alloc] initWithData:data error:&error];
audioPlayer.numberOfLoops = 0;
if (audioP...
Hi there,
i implement an actionsheet, when press "ok" button, do these, press "cancel" go back. the "ok" button is working fine, but when i press the "cancel" button, nothing happens, it doesnt retract or do anything, just hang at the actionsheet view.
below is my code:
create button at nav bar:
UIBarButtonItem *clearButton = [[[UI...
i want to create an app in obj C that starts by accepting and verifying a locally stored username and password. can anyone please help me out wid it?
...
I am looking to implement CATransitions within TTNavigator, I know the method
openURL can take a UIViewAnimationTransition but that only gives me
flipping and curling animations, but with CATransition I have access
to another 8, of which kCATransitionFromRight, kCATransitionFromLeft,
kCATransitionFromTop, kCATransitionFromBottom are the ...
hey gays I have create the music application .But now I want to implement the coverflow in my application .And get code for coverFlow but I have problem with that .I want When ever I click on cover flow image it must flip and the particular song(uiclass ) must start or come on the screen.
it like the When tapped, albums flip over just...
What is the advantage of using blocks over normal methods and functions in Objective-C? I've read the documentation, but I can't find specific uses of blocks instead of other language features.
I'm sure that I've missed something, so could someone explain the advantages of blocks in a simpler way than the existing documentation?
...
Hi, i've got a problem:
lets say i have two view controllers, firstViewController and secondViewController.
The firstViewController is supposed to present the secondViewController and i also want to access a bunch of methods and properties from the secondViewController through the firstViewController.
I do this by simply using the imp...
Hi guys,
I am getting a problem when I am converting an NSMutableData to NSString.
- (void)downloadOutstandingFileSounds:(NSString *)urlString
{
NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]
cachePolicy:NSURLRequestUseProtocolCachePo...
Hi i'm trying to give a request to the url in iphone sdk the http method is POST. The http body contains some escape characters
NSString *requestMessage=[NSString stringWithString:@"?username/u001password/u001description"];
NSMutableURLRequest *url=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://welcome.com"]];
...
I want to display data loaded from a webservice but the webservice is taking a long time and the "data" is being displayed before it is loaded. How may I force it to wait?
Thanks.
Connection to web service
NSMutableURLRequest *theRequest=[NSMutableURLRequest requestWithURL:tmpURl];
[theRequest addValue:@"text/xml; charset=utf-8" forH...
NSMutableString *str = [[NSMutableString alloc] init];
Suppose str has right know a value "me".
And On click of a button I want that the value of str get reset. That is the string value become nil or empty.
now i am using this [myword stringWithString: @""]; but not working.
...
Hi,everyone,
I use the following code to set the retrieve the phone number in my app.
CFStringRef addressBookMobile;
ABRecordRef person;
NSString *mobile;
person = CFArrayGetValueAtIndex(people, i);
addressBookMobile = ABRecordCopyValue(person, kABPersonPhoneProperty);
mobile = [NSString stringWithFormat:@"%@", addressBookMobile];
T...
Is there any way to specify if current thread is main thread or not in objective-c?
I want to do something like this.
- (void)someMethod
{
if (IS_THIS_MAIN_THREAD?) {
NSLog(@"ok. this is main thread.");
} else {
NSLog(@"don't call this method from other thread!");
}
}
...
Hi,
Is there some way to get UIKeyboard size programatically. 216.0f height and 162.0f height in landscape.
Following seem to be depricated. Is there some way that works without any warning in both 3.0 iPhone OS SDK and 4.0 iPhone OS SDK to do this..
CGSize keyBoardSize = [[[note userInfo]
objectForKey:UIKeyboardBoundsUserInfoKey]CGR...
hi i wanted to play an mp3 file in one of my project but am not able to do that i have added MediaPlayer.framework but still am not able to do that, can u please give me a sample code to play mp3 or just provide me the link.
I have took a UIviewsubcontroller subclass
Please help me out
Thank You
...
When running the following prepare statement for a SQLite3 db-selecct query I get a SQLLite Error 21 "Library routine called out of sequence":
sqlite3 *lDb;
sqlite3_stmt *lStmt;
NSNumberFormatter *lNbrFmt = [[[NSNumberFormatter alloc] init] autorelease];
// Define SQL statement
NSString *lSql = @"SELECT secti...
how do I observe keyboard input event while the applicaion is not actived.
...
Hi
I am writing a code that reads data from a http connection and stores in a byte array.
I have written my own NSOperation class. Reference of the code is
Concurrent Operations Demystified
My HttpWorker class declaration is like
@interface HttpWorker : NSOperation{
NSString *param;
double requestCode;
BOOL isLive;
l...