Is everything declared within the braces following a class declaration in a header file an IBOutlet, even if you don't write IBOutlet? I notice when following some tutorials the IBOutlet word is missing for some instance variables declared within the braces, but then after the closing brace they will be defined again as a property with t...
How do I create a NSDate of August 1, 2005? Found NSDateComponent on the internet, but seems too complicated.
...
Using this code causes a Bus Error. Can someone point out what is wrong with it? I'm overriding a method from CALayer.
- (void) setBackgroundColor:(CGColorRef)c
{
float *components = (float *)CGColorGetComponents(c);
[super setBackgroundColor:[LOLColors colorWithRed:components[0] green:components[1] blue:components[2] alpha:tran...
I have a view controller, which creates 2 view controllers inside it. Inside each of these child controllers I wanted to create a property, which would be public, and accessible from the parent controller.
I am using the following method
TableViewController.h
@interface TableViewController : UITableViewController {
NSInteger proj...
I have a program where we are using a navigation controller and need the app to launch to one of two different views. Basically if certain info has previously been entered then we need the app to launch to view A, but if the info has never been entered then we need it to launch to view B. I am having difficulty getting this to work and a...
One book for about iPhone programming instantiates classes like this:
[[Class alloc] init]
Another book about Objective-C does it like this:
[Class new]
What's the difference?
...
How to make a CALayer and all the things inside it semi-transparent? That includes all the things drawn with CoreGraphics and CoreText.
layer.opacity = 0.5
...
Hi,
I'm working through the Core Data Utility at http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreDataUtilityTutorial/Articles/00_introduction.html#//apple_ref/doc/uid/TP40001800-CH202-TP1
I've stumbled on a rather nasty crash SIG_ABRT on the line that reads:
[moc save:&error]
This is the output in the debug...
I have come across an interesting conundrum (of course, I could just being doing something horribly wrong).
I would like an NSTokenField to "represent" a relationship in a Core Data Application. The premise is such: You click on a Note from a TableView (loaded from the Notes Array Controller). The token field is then bound (through "val...
I'm pretty new to OOP in general and just really started working with Obj-c a few months back. So, please be gentle! I appreciate your help in advance. Now to the question!
I have 3 Text Fields where a user inputs name, phone, and email.
I collect and place them in a label using an NSString like this [this is the one for the name]:
- ...
I found there are at least three ways to launch an app with Mac OS X from an application.
NSTask. I can give parameters, but it seems that it's not for an Cocoa App, but an UNIX style binary.
system function (system()) just the same way as C does. I don't know the reason why but it seems that nobody recommends this method.
NSWorkspace...
I've been trying to get OAuth for Twitter to work on my iPhone application for the last couple of days, and I cannot for the life of me figure out why I'm getting this error. I've changed the way I've been approaching this for a while now, but still nothing. So I turn to SO to hopefully figure it out.
The tutorial is linked here. Downlo...
I've created several Cocoa applications now, but I'm unsure of basic concepts of game development. I've written apps using very few custom interface elements and only very simple graphics work, and I'm looking to write a pretty basic 2D game to get started (but in realtime, not checkers or something (which I think I could handle already ...
Hi, I'm trying to pass a nsstring by reference but it doesn't work.
this is the function:
+(void)fileName:(NSString *) file
{
file = @"folder_b";
}
and this is the call:
NSString *file;
[function fileName:file];
nslog(@"%@",file); // and there is nothing in the string....
What I must do to pass my string byref.
...
If you import UIKit.h does that also automatically import Foundation.h?
...
I just like to implement a function : Develope a app , and have a outline view, which have a folder and file tree just like Finder or a app called PathFinder , how to implement it ? Thank you very much!
...
I've got a simple object "post" that has two NSMutableArrays as properties. One is for "image" objects and the other is for "video" objects. At some point in the lifecycle of "post", I ask it for a dictionary representation of itself.
NSMutableDictionary *postDict = [post getDictionary];
-(NSMutableDictionary *)getDictionary{
NS...
I used a webkit to show a flash , but now I want to add a play button and control the flash , How to do ? thank you very much!
...
I am working on an app in which the starting point is a map and it has a button too. What i want is that if user clicks the button it will take him to another view which just have two or three buttons or other elements.
Please provide me with detail answer so that i would be able to do it.
Thanks in advance, i would really appreciate i...
I tried to run equivalent of "TextMate foo.txt" using launchApplicationAtURL. The name of binary is "TextMate", and I have one parameter.
I tried the following code, but it doesn't seem to work.
// find the textmate
NSURL * bURL = [[NSWorkspace sharedWorkspace] URLForApplicationWithBundleIdentifier:@"com.macromates.textmate"];
NSWork...