I'm working on an app that needs to transfer files to an AFP volume -- ideally, it wouldn't mount the volume on OSX, since it's really unnecessary.
Looking over the AFP protocol stuff, I came across an old Carbon header file "afpDatastream.h". This used to be in the framework "AppleShareClientCore", however it's no longer there (on Leo...
I was reading the docs on core data looking to speed up my search. I found the following and was slightly confused as to what it meant:
The SQL store, on the other hand,
compiles the predicate and sort
descriptors to SQL and evaluates the
result in the database itself. This is
done primarily for
performance—databases are mu...
What syntax do you think is better/more readable?
if(!myViewController.view.superview)
or:
if(myViewController.view.superview == nil)
Thanks!!
...
Hello,
I have decided to enter the iPhone App development arena and as such have a couple of questions:
Coming from a business management background and having no experience/knowledge whatsoever in developing, what would be the right way to start?
I am aware that I should learn Objective C, to begin with; as well as OOP etc... will re...
I include the amalgamation sqlite code in my iPhone project, and remove the reference to the iPhone sqlite framework.
My main target compile fine.
I have a second target for unit testing with the google framework. When compile I get:
error: syntax error before '@' token
I don't understand why. I have set both projects to sdk 2.
...
I'm calling valueForKey on an object. This returns an id which I tried to cast to a BOOL (because I know the value is a BOOL). But XCode gives the following warning:
"warning: cast from pointer to integer of different size..."
So what I ended up doing was this:
BOOL value = [[NSNumber numberWithInt:((NSInteger)[managedObject value...
I need to get the BIT length from NSUinteger or NSString
How i can get the bit length?
Thanks
...
How how constants in all examplese I've seen always start with k? And should I #define constants in header or .m file? I'm new to objective c, and I don't know c. All tutorials and books assume you know c, so I don't understand these things, is there some tutorial somewhere that explains stuff like this?
Thanks.
...
If I have a set of custom UIViewControllers that I release in a high level application "restart" routine, would a good way to release their views be to set
self.view = nil;
in the dealloc method?
...
I saw a few answers to this issue, and I get it — you can't declare and assign variables inside a switch. But I'm wondering if the following is correct at throwing an "error: expected expression before 'int'
switch (i) {
case 0:
int j = 1;
break;
}
Why would putting an NSLog before it result in no errors?
switch ...
Hey all, I'm a total noob when it comes to Objective-C / iPhone development.
I'm trying to pull in text from a SQLite DB. I have a while loop that looks like this:
while(sqlite3_step(selectstmt) == SQLITE_ROW) {
And within that loop, this prints to the log just fine:
NSLog(@"Text: %s",sqlite3_column_text(selectstmt, 1));
This does...
I have an object that has several properties. If I have a pointer to one of those properties, is it possible to get a pointer to the class instance to which that ivar belongs?
for example: foo.bar, where I know the address of bar, can the address of foo be found?
This seems related to: run time references but I didn't see any referen...
hi...
i m trying for apply for check mark in table view, but it is not working, if i checked again at that cell again then check mark apply. but not apply at new selected cell.
any one there who help me....
thanks aamir.
i m using following code
pragma mark -
pragma mark Table Data Source Methods
(NSInteger)numberOfSectionsInTabl...
I have a UIControl subclass for a custom slider type control (one that behaves differently from UISlider). At the moment I use my own target and action variables to send a message to the target whenever the slider value changes. But this doesn't play nice with Apple's UIControlEvent constants. I wasn't sure if I should use these, and if ...
I'm trying to compare names without any punctuation, spaces, accents etc.
At the moment I am doing the following:
-(NSString*) prepareString:(NSString*)a {
//remove any accents and punctuation;
a=[[[NSString alloc] initWithData:[a dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES] encoding:NSASCIIStringEncoding] a...
Hello!
I've a question about a good way to protect a bit my cocoa app from piracy!
I know that this is impossible!
So, in my app I've an isRegistered() method that run every time the user launch the app!
This is called in the applicationDidFinishLaunching: App delegate ... so if this method return true, the app continue to execute the ...
I'm trying to understand how to get my iPhone application working with RegexKitLite, I tried searching Google for how to install it but couldn't find anything that explains it clearly. Hopefully this will become a step-by-step guide for anyone searching for it in the future.
Alright so according to the documentation it says:
The two...
I dont quite understand how to change (decrease) the font size for the text in my NSOutlineView. The default text is larger than most applications use for their font size.
There is some heirachical thing where you dont set the font directory but you inherit from something "above" the table or outline view.
Is there anywhere that neatly...
I'm writing a graphical application using Objective-C for the front end and C++ for the graphics processing and network communication. I read around on Apple's site looking for a way to link either a .dylib or .so with my C++ code in it to my Xcode project, but nothing seemed to work. I was able to get the project to reference it and lin...
I can't seem to get the text to actually span multiple lines. The heights look correct. What am I missing?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"StatusCell"] autorelease];
...