I'm being offered a C++ job and need a quick brush-up project so I can become fluent in the language again. Currently I develop iPhone applications and became fluent in C/Obj-C from a background of Python, Java and C# in a matter of days. I'm looking for an idea for a small project, or a brush-up sort of course online that I can complete...
What languages can be used to develop for the iPhone? I know, I know: canonically speaking, Objective-C is the one and only language can be used to develop for the iPhone. But I'm appealing to the creative hackers out there.
Is there anything - no matter how hacky - other than Objective-C which can be used to develop for the iPhone? (ot...
I've written a fairly simply QuickLook plugin, which displays the files of a .torrent file,
The complete code is here on Github, and the main file is torrent.m
The reason I'm looking for feedback is it's acting slightly weirdly.. After building/installing the plugin (into ~/Library/QuickLook/), and running..
qlmanage -r; qlmanage -p ~...
I'm using the runtime functions to get the type of a property (thanks to eJames for helping me to figure out this way).
The attribute string of the property looks like this:
T@"NSArray",&,Vstuff
I need to check if the property type is an array, at the moment I'm doing it like this:
- (BOOL)valueForKeyIsArray:(NSString *)key fromT...
All I think to know is, that it marks a property "public". And it creates setters and getters automatically. But when I don't have that, are my properties private?
What's the name of this "technology"? Why's there an @ in front of "property"?
...
Example:
@property (..., assign)
there, I don't do any cleanup in the dealloc Method. But when I have an
@property (..., retain)
then I would do so.
I have that from somewhere in the internet. Don't remember the site. Well, I know that the retain-keyword in the compiler directive would make a retain count +1, but actually I think...
I want to figure out in which cases I need to care about memory management when it comes to properties. I wrote down something from a site I don't remember anymore, where they said that if a property has any value other than NSNumber or NSValue, and if it has no setter, then UIKit would autorelease the old value and retain the new one. A...
Example
-(void)dealloc {
self.myOutletProperty = nil;
[super dealloc];
}
I guess that a sort-of virtual setter will be called. But what exactly happens here? Why nil?
...
Are there any good rules to learn when I should use retain, and when assign?
...
Hi
I am investigating a port of an app to the iPhone. My existing business logic is C# in a class library dll. It does some processing as well as sommunicating with web sites.
I understand that Objective-C is the best thing to develop with on the iPhone and I'm prepared to dive in, but if possible I want to avoid re-writing the existin...
I'm writing my first OS X Objective-C framework, but I do not know how to test it. How can I execute methods and classes in framework for testing purposes?
...
Hi
I have a UIWebView And how can i get It's scroll position ?
I know, that UIWebView has a UIScroller subview. But I can't get offset of this UIScroller (((
...
Apple says, that I need to have Outlets in my File's Owner for all my top level objects in a Nib file.
As much as I know, these objects are NOT the File's Owner itself (would make no sense, right?) and the First Responder.
I am unsure about: The View object in the Nib, and any controller object in the nib. Do I need an outlet for thos...
Somewhere I was reading that I would run into memory problems when I give up a view temporary due to an low memory warning (loading it again as soon as the user wants to see it), if theViewController class does not do things like this on every outlet of that view:
-(void)dealloc {
[myView release], myView = nil;
[myLabel release...
Currently I am jumping into the ice cold water called "memory management in iPhone OS".
Here's one rule i've learned:
Every time I see an alloc in my method, I will release that corresponding variable at the bottom of the method.
Every time I create an @property(...) in my header file which says copy or retain, I put a release message...
I'm trying to retrieve the amount of memory my iPhone app is using at anytime, programmatically. Yes I'm aware about ObjectAlloc/Leaks. I'm not interested in those, only to know if it's possible to write some code and get the amount of bytes being used and report it via NSLog.
Thanks.
...
I have an app where my main view accepts both touchesBegan and touchesMoved, and therefore takes in single finger touches, and drags. I want to implement a UIScrollView, and I have it working, but it overrides the drags, and therefore my contentView never receives them. I'd like to implement a UIScrollview, where a two finger drag ind...
I added a UIScrollView in my appDelegate, and then did
scrollView.contentSize = CGSizeMake(720, 480);
scrollView.showsHorizontalScrollIndicator = YES;
scrollView.showsVerticalScrollIndicator = YES;
scrollView.delegate = self;
[scrollView addSubview:viewController.view];
[window makeKeyAndVisible];
Where view Controller loads up a UIV...
I am sending a post using NSURLRequest.
NSURL *url = [NSURL URLWithString:someUrlString];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url];
NSString *msgLength = [NSString stringWithFormat:@"%d", [parameterString length]];
[theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"];
[theRequest setHT...
I want to create an function which I pass an object. Then, this function should print out some information for me.
like:
analyzeThis(anyObject);
I know about methods, but not how to make a function. As I understand, a function works global in all methods and classes, right?
...