I have a view (and corresponding view controller) in my iPhone app that allows the user to edit settings for the application. This view is accessible via a menu (a table view). I use pushViewController in my UIViewController subclass to get it shown. When I do this, it appears as I expect - the nav bar appears on top of the xib, and the ...
I've read the NSPredicate documentation and couldn't wrap my head around it all the way. Simple predicates I can understand, but now how do I create a predicate for the following situation:
I have an array of Foo objects. In the Foo class, one of the iVars is an NSMutableArray of Bar objects. I need to filter the array of Foo objects...
I've got a generalization in my core data model with entities named A, B, C let's say where A is a super class with subentities B and C.
A is not abstract, so if I create an A NSManagedObject, I need to create and relate a single B or C subclass object. How do I make this happen? I can create the entities, but HOW do I tell the model ...
Hello all,
I am fairly new to iPhone development and I have what seems to be a simple question that I cannont figure out. How can I verify that a user input a number and a decimal into the text field?
I have tried many different things but the closes I can get only allows for numeric strings of the form: 5.34 or 23.89. I need it to ...
Hi, I am creating a navigation based application and in the root view, it lists an array of choices, which as many you know leads to a more specific choice. My question is the lists that is displayed on the root view is actually not a choices of different functionality like calendar,mail but a choice, which is going to do the same functi...
Hi,
I'm not asking how to do this, it's more in line of "What would you call this?".
I have an NSTableView with several custom cells. I want the table to scroll row by row, meaning that when I move the scrollbar up I want the top row to disappear and when I move it down I want the bottom row also to disappear - I don't want to see half...
I'm writing a Cocoa application in Objective-C, and I would like to be able to incorporate Markdown. The user will enter text in Markdown syntax, click an "export" button, and the program will output a file of XHTML.
It seems like there are a lot of options, though. I could use one of the C/C++ implementations, I could run the Perl scri...
This method is generated by Xcode 3.2 using "Accessor defs to clipboard"
- (void)setBodyMass:(int)newBodyMass {
if (bodyMass != newBodyMass) {
bodyMass = newBodyMass;
}
}
Could I just as easily write this as you see below? It seems to be doing a conditional test to save it doing a possible redundant assignment.
- (voi...
In Objective-C, I'd like to force derived classes to implement a given interface without providing a default implementation (an implementation in the parent class).
I understand that Protocols can be used for this, and I believe I understand how to use Protocols, but I'm apparently missing something...
I have defined class Parent, and ...
I need to measure the pixel width of a string in objective C can anyone point me to a link that explains how to do this? I haven't found anything that explains this well.
...
I'm creating an iPhone app that needs to add a custom category to extend uinavigationbar. Can anyone give me a code example of how I would create and implement this category to extend this class?
...
In my current test I have a class "PlanetClass" that inherits from "celestialClass". My question is when I release my "PlanetClass" object it goes through both dealloc methods, firstly releasing the Planet object and then the Celestial object. I added the dealloc to celestial to make sure I could release the iVar "bodyName", I think I ha...
Let's understand the my requirement / question.
I have to develop following things in my application.
Application starts with a view controller ( obviously )
Now, after loading the view controller
"Touch me" characters should enter on screen animating, animation direction should be random.
OK. Let me clarify again.
The aim of questi...
Hi,
I have created a minimal OS X boot stick (basically the Snow Leopard DVD with all the packages and installer stripped out). I've written a basic Cocoa app launcher to launch other apps that I put in the Applications folder (the minimal install lacks Dock and Finder).
When I try to launch an app I get this error:
LSOpenFromURLSpec(...
I've created a subclass of NSBox to implement drag and drop. I have the following code:
@interface DropView : NSBox {
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
@end
@implementation DropView
- (void)awakeFromNib
{
[self registerForDraggedTypes:
[NSA...
Hey all,
Do any one of you know how to increase the brightness of the apple logo in cooca? I think it would be cool if my app could control that. Although you could increase the brightness of your screen that is not what I want, but what I want is just to increase the apple logo.
Best Regards,
Kevin
...
I have used rand(). But it gives a specific value even after I restart application.
I have implemented following in my application.
- (void)viewDidLoad {
[super viewDidLoad];
int x,y;
x=random() % 480; y=random() % 300;
lblT.center=CGPointMake(x,y); // my label lblT
}
Try to implement in your application, and launch application.
Af...
I need a little help about KVC.
Few words about the operating context:
1) The iPhone connects (client) to a webService to get an object,
2) I'm using JSON to transfer data,
3) If the client has exactly the same object mapping I can iterate through the NSDictionary from JSON to store the data in the permanent store (coreData).
To do t...
I'm trying to use the MPMediaItemCollection count property to sort the items in an array. When I try to sort an array with this NSUInteger property, and it doesn't work. When I try to print it (NSLog(@"%lx",count);) it doesn't print correctly.
How do I get the NSUInteger to work correctly?
...
I need to know which method is used to identify tap/mouse click.I
know
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {}
which are triggerd when cursor moved.
But I want to do following things-
I have an image.
When i will click it, similar two image...