MPMoviePlayerViewController* moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:myChartlyObj.video_url]];
moviePlayerViewController.view.backgroundColor = moviePlayerViewController.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"st-screen.png...
I'm trying to understand NSURLConnection performance on a 3G network from an iPhone. I have the following test code
-(void)doTest2 {
max = 5;
NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
NSURLRequest *request2 = [[[NSURLRequest alloc] initWithURL:url] autorelease];
NSURLConnection *conn=[[NSURLConn...
Hey All,
My iPhone application has a UITable View implemented with search functionality in it. The values in the table are grouped into sections from A-Z. Whenever a user tap on particular cell in the table it loads a detail view controller which gives all the values of that particular user. Now my problem is whenever I search some conta...
Hi,
trying to figure out how to add zeroes in front of a random generated number with dynamic length of the number.
For example if the number is 10 characters long, I can print the number as stringWithFormat:@"%.10d",i
Since the numer can somtimes be shorter than maximum length, it needs zeroes to fill the maximum length of the numbe...
I want to do the following:
ViewControllerA should not go into horizontal orientation
ViewControllerA pushes ViewControllerB
ViewControllerB should go into horizontal orientation.
Not sure what to set to make this happen.
...
hi there,
looking for some help.. i have 2 controllers, 1 contains a custom cell table. when user selected a cell, i will be display at the other controller. so far my approach is when at controller 1, if cell selected, save to plist, than at controller 2, load the plist.
my saving and loading code:
NSMutableArray *selectedData;
sel...
Hi
I'm looking for the best way to check that an NSString contains both numerical and alphabetical characters.
What I have come up with so far is the code below but his just tells me that now characters were entered which aren't number or letters.
if( [[myNSString stringByTrimmingCharactersInSet:
[NSCharacterSet alphanum...
every time i am writing some data to my server i first send a message containing a number which is suppose to tell the server how much data i am going to send.
For example before sending 1024 bytes, i need to first send the "1024" to the server then server can start reading for 1024 bytes.
How can i make sure the first message (number o...
I am sorry if this has been asked before, I have looked throughout stackoverflow and haven't found an answer to this question.
In the NSObject protocol, it defines a method that is similar to this:
-(Class) class
What type of object is the Class object? Or is it even an object? What can I do with the object? Can I get the base class ...
In my apps, I have a toolBar with a button inside. When you pressed that button a actionSheet appear and you can change the langage of the apps. I want a put this toolBar in a lot of view, but I want to use the same object, not copy-paste in all my view. So I create a UIViewController with a nib file, this nib file containt my toolBar. N...
I'm finishing my second book on iPhone development (Beginning Iphone 3 Development - Mark/LaMarche) and, while this book covers the 4 main persistence mechanisms, I'm still not sure which one to use for my application. My data model is not very intricate, but I do need some relationship definition and functionality.
So what are the sea...
I'm working on a basic iPhone game that requires a single-screen tilemap. Nothing difficult there. I come from a C background, so my current solution looks a bit like this:
typedef struct _Tile {
NSString *type;
} Tile;
@interface Map {
Tile mapData[MAP_TILE_MAX_X][MAP_TILE_MAX_Y];
}
This works fine, but I'm wondering if ther...
I have an NSAlert item that uses an NSTextField as an accessory item to provide an prompt-like dialog box. The only problem that I have is that when the alert is ran the text field is not focused. I tried looking for a way to change NSAlert's first responder but found nothing. Is there a way to easy focus an accessory item in NSAlert?
...
I have read that it has something to do with time, also you get from including time.h, so I assumed that much, but how does it work exactly? Also, does it have any tendencies towards odd or even numbers or something like that? And finally is there something with better distribution in the C standard library or the Foundation framework?
...
hi all,
i have 3 images that i would like to use them to generate my custom button. my images are left.png 5x20, right.png 5x20 and mid.png 1x20. my mid.png must be repeated as long as my text lenght. how can i generate it in iphone application on the fly?
thanks.
...
I have an image that changes due to a button press. I have the code set up like this:
UIImage *example = [UIImage imageNamed: @"Example.png"];
UIImage *stuff = [UIImage imageNamed: @"Stuff.png"];
UIImage *bob = [UIImage imageNamed: @"Bob.png"];
UIImage *thing = [UIImage imageNamed: @"thing.png"];
It used to be so that the last image ...
I want to use NSFileHandle to write large text files to avoid handling very large NSString's in memory. I'm having a problem where after creating the file and opening it in the Text Edit app (Mac), it is not displaying the unicode characters correctly. If I write the same text to a file using the NSString writeToFile:atomically:encoding:...
I have an NSWindowController subclass called _PreferencesWindowController with the following implementation -
@synthesize window;
- (id)init {
self = [super initWithWindowNibName:@"PreferencesWindow"];
if (!self) return nil;
return self;
}
And I tried to show the window in _PreferencesWindowController by using the following code...
Possible Duplicate:
what is the difference between #include <filename> and #include filename
Why do we use Quotation Marks ("...") for custom build classes and braces for built in classes(<...>)?
...
So what i want to do is when any given UIView is touched, and moved around the window, to bring that to the front and be on top of all other layers. is there a way to do this programatically?
...