Hi,
So I'm creating an input socket using
CFSocketCreateWithSocketSignature (NULL, &signature, kCFSocketDataCallBack, receiveData, &socket_context);
Within the receiveData function (that gets called properly) I'm trying to use the CFDataRef address parameter to find out the sender address of the this "package".
The IP address of the ...
I want take player name as input by using UIAlertView. Is it possible to add textField on the UIAlertView?
...
We use encrypted web pages in our iPhone app, and intercepts these calls (e.g. when clicking a link) in the webView:shouldStartLoadWithRequest: method to get the file path, decrypt the data to the original html string and then doing a loadHTMLString: on the webView (returning YES in webView:shouldStartLoadWithRequest:, obviously).
The p...
UiWebView redirect its self to already login page.i want to stop redirect?
I want web view to reload login page and ask for username and password.Clear context and load request again.
NSString *urlAddress = [NSString stringWithFormat:@"http://www.facebook.com/login.php?];
//Create a URL object.
NSURL *urld = [NSURL URLWithString...
More often than I'd have hoped I seem to come across method/property definitions in Apple's documentation that are vague at best and meaningless, to me, at worst. For example, take the following method description from NSNumberFormatter Class Reference:
setPartialStringValidationEnabled:
Sets whether partial string validation
...
I would like to change the first character of an NSString to uppercase. Unfortunately, - (NSString *)capitalizedString converts the first letter of every word to uppercase. Is there an easy way to convert just a single character to uppercase?
I'm currently using:
NSRange firstCharRange = NSMakeRange(0,1);
NSString* firstCharacter = [da...
Hello!
Is it possible to auto-rotate the default application image according to current landscape mode? I can rotate my views just fine according to information from the UIDevice class, but I would like the whole application to be in the correct landscape mode from the start.
...
Is it ok to add ivars and methods to an instance of NSMangaedObject?
By "extra", I mean ivars that you don't want serialized.
Do I just add them to my NSMangaedObject subclass like any other class or do I have to take any extra precautions?
...
I want to get the OS X system version, such as: 10.5.4, 10.4.8, etc. I want to get it in my app, how do I do this? Thanks!
...
(BOOL) addticket {
NSString *event=@"max";
NSString *venue=@"tvm";
sqlite3 *database;
databaseName = @"smbhDB.sql";
sqlite3_stmt *addStatement ;
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [documentPaths objectAtIndex:0];
...
Hello. I have a basic question. Say you have a NSFetchRequest which you want to perform on a NSManagedObjectContext. If the fetch request doesn't have any sort descriptors set to it explicitly, will the objects be random every time, or are they going to be spit out into an array in the order they were added to the Managed Object Context ...
When an IBAction is called:
-(IBAction) onClick1: (id) sender;
What is passed in the sender? Since it's hooked up through the IB, I'm not really sure. My question is how to get the text of the button to be the passed object (NSString most likely) so that I could call it inside the action implementation.
-(IBAction) onClick1: (id) s...
For me, a library is a collection of classes that do useful things. Typically something, that can be useful in a lot of projects. Is that also the case in terms of objective-c? What exactly is a library there? Only classes that have methods? Or also collections of functions? And do they have to be compiled to be called a "library"? Where...
It seems that in a standard Xcode project, the default target automatically "updates" the Compile Sources build phase with any newly-added implementation files. This saves the user from having to drag each new file into the phase.
I have defined a second target, which contains a large amount of unit testing code, which is linked as a di...
What is the best way to protect a Cocoa shareware application from software piracy? Are there developer libraries/tools out there for this task?
...
Please advise a combination of server and client technologies, tools and frameworks to implement a solution that meets the following requirements?
File server in the network has a huge library of mp3/aac/aiff/wav music files
Desktop cocoa application accesses audio files using URLs: rtmp, http, rtsp+rtp, ftp — how to make a choice?
Audio...
I can't seem to find a good built-in way to convert an NSString to wchar_t... any tips on how to do this? Anything Apple exposes on the NSString class is for c-strings (char*) or for unichars, but nothing for wchar*.
...
Is there an API in cocoa in which you can grab an application's window/document name? I've already got [[NSWorkspace sharedWorkspace] launchedApplication] to fetch all available applications, so I've got access to the bundle name or process id. What should I look into so that I can get other application's window/document name.
...
I'm developing for the iPhone, and I have a class DataManager, that is used to maintain my application data. When the application launches/exits, the data is read from/written to disk to create an instance of this class, using the NSKeyedArchiver (and Unarchiver) classes, since the DataManager adheres to the NSCoding protocol.
One probl...
Greetings, I'm currently learning Cocoa and Objective-C. I've run through "all" the tutorials and I'm fairly comfortable with the ObjC language. What I'm looking for now is to learn Cocoa idioms and see real code used in nice-looking Cocoa apps.
It seems like serious apps (iTunes, etc.) don't just drop in the IB elements. They do a lot...