Does anyone have a precise understanding of when webViewDidFinishLoad is called on a UIWebViewDelegate? I've read that it fires once per iframe, if they exist, but I'm concerned about exactly when it loads with respect to the DOM and javascript events.
Is all of the javascript and DOM guaranteed to be downloaded, interpreted and ready ...
I'm building a framework in Xcode, and I need to display a window when a function is called. How do I get my framework to display a window that I build in Interface Builder? Step by step instructions would be greatly appreciated!
Thanks,
Chetan
...
I'd like to use CocoaHTTPServer to set up peer-to-peer communication between different instances of an application on a network. Setting up the server was quite easy, but writing the client is another story.
I have the server broadcasting over Bonjour. My client is able to find and resolve the service, but I'm stuck when it comes to get...
Hey guys,
I've been developing for Windows and *nix platforms for quite some time, and am looking to move into Mac development. I am tossing up between using ObjC/Cocoa and C++/Qt4.5.
The C++/moc semantics make more sense to me, and improving knowledge in Qt seems like a sensible thing to do given that you end up with a skill set that ...
Now I want to hide or show with my condition a divider when my app run. used this delegate method:
- (BOOL)splitView:(NSSplitView *)splitView shouldHideDividerAtIndex:(NSInteger)dividerIndex
{
if (A)
return YES;
else
return NO;
}
but it didn't work , why? How to used this method? Thank you very much!
...
I have a very clear question:
//.h file
@property (nonatomic, retain)NSMutableString * retainString;
@property (nonatomic, copy)NSMutableString * copyString;
//.m file
@synthesis retainString, copyString;
-(void)Process
{
NSMutableString *test = [[NSMutableString alloc]inti];//retain count should be 1
self.retainString = test;
...
I need to build an application on Mac OS X that runs on the background, windowless and provides a status icon in the top-right corner of the menu bar. It should launch on a specific action initiated by the user (not at system start up) and interact solely through the status bar icon.
On Windows this is very close to Services, on Unix -...
How would I set the Line Height/ Line Spacinh in an NSTextView? e.g How tall each line is or how much space is between each line.
...
I have built some basic apps for iPhone and Mac with a general understanding of Cocoa, but haven't had a detailed understanding. Now I want to go deeper.
I have just finished the Objective-C documentation at MacDevCenter. It was great to get in-depth look but took far too much time, specially because a lot of it is conceptual, and it's ...
I'm trying to resolve a NSNetService (named "My_Mac") to an IP in a background app with this code:
NSNetService *service = [[NSNetService alloc] initWithDomain:@"local." type:@"_daap._tcp" name:@"My_Mac"];
[service setDelegate:self];
[service resolveWithTimeout:5];
And in the same class, I have these delegate methods defined:
- (void...
Let's saying the user is currently on Chrome. So I have a HUD that is invoked by a global hotkey, the user then types something into it and on clicking Close or OK, the HUD goes away (just using [NSPanel orderOut:]) but my application is still focused (i.e. the Menu bar of my application is still visible). But I want the focus to go back...
After the user enters his / her license key, my application activates itself with that key (online). How do I store this activated state and the license key so that the next time the user opens the app, the app will know that it is already activated?
...
How would I set this method to display the alert panel 30 days from the initial launch of the application?
-(void)awakeFromNib
{
NSDate * today = [NSDate date];
NSTimeInterval expiry = ();
if ([today timeIntervalSinceReferenceDate] > expiry){
NSRunAlertPanel(@"Trial period has ended", @"Please Register", nil, nil, nil);
NSLog(@"e...
Hi.
i'm writing an app that stores passwords on the keychain, and later obtains them with SecKeychainFindGenericPassword(). this works file 90% of the time, but every once in a while, the call to SecKeychainFindGenericPassword() will fail with errSecAuthFailed (-25293). when it does, just trying again, or restarting the app fixes it.
d...
I'm just starting to mess with bindings. I've started implementing a preference dialog, binding some NSColorWell's to the shared defaults controller. That's working perfectly. My values are encoded and saved correctly.
However, what's not working is canceling out of the dialog. If I cancel out, the values are still saved.
It seems l...
I am trying to make a simple document-based cocoa application that can save and load images in pdf files.
For the save part, I am using
- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
{
return [imageView dataWithPDFInsideRect:[imageView bounds]];
}
And this works, the image could be saved to a PDF file.
Fo...
I'm getting a NSObject doesNotRecognizeSelector error when trying to set a property and I'm not sure why.
The error occurs on the first line of setWithNSColor. I'm a bit confused how a property that's properly synthesized could be not recognized.
@interface ScopeColor : NSObject {
NSString *colorIntegerString;
float redColor;
float gr...
I am working on a Cocoa application that uses FTP and SFTP transfers, and the best way I've found to accomplish this is by using libcurl. Now I'm pretty sure that Mac OS X does not ship with libcurl installed, and even if it did it most likely wasn't built with libssh, which I would also need.
The only solution I can come up with in my...
I'm using the MGTwitterEngine to connect to twitter and I want to use OAuth with the MGTwitterEngine?
...
I'm mainly write iPhone apps but am familiar with some desktop Mac authoring. I need to create a Cocoa app that will include several wav sound files (included in bundle). I don't want a user viewing package contents of the .app file and then extracting all of the sound files from it. Is there a way to protect those files?
...