Is it possible to share one parameter of a class among all the instances of this class, in objective-c?:
@interface Class1 : NSObject {
NSString* shared; /** shared among instance (this is not, but defined somehow) **/
NSString* non_shared; /** other parameters non shared **/
}
In the program then, each instance of Class1 has ...
February, 26 2010 21:34:00
Based on all the documentation I can find, MMMM, d yyyy H:m:s should be correct - but my NSDate dateFromString is returning null.
...
I have a program with four different buttons. I want to interchange the position of the buttons randomly. For example: 1 2 3 4 Later: 3 4 1 2 Later: 1 3 2 4
Is there a algorithms for that? The only way I can think is to make a random number from 1 to 24 (24 possibilities) and then code all the possible button postitions.
int foo ...
I have a view controller class that has to implement several protocols. Too keep things neat I have a habit of putting each protocol's methods in a category on the view controller class.
This time I am getting warnings from the linker that the class does not implement one of the protocols. The methods do work at runtime, the linker jus...
Can someone tell me how I can realize the rolling / unrolling animation as in google maps for iPhone? Thanks.
...
I have a demo working but I was wondering if there is already a library like Three20 that comes with this sort of control.
This is what I have till now. It's not refactored yet.
-
(void)viewDidLoad {
[super viewDidLoad];
// Gets Types
[self getTypes];
// Set Guilt Types UI
CGFloat kTopMargin = 160.0;
CGFloat kTopMarginSpan...
Hi all, I have some NSDictionary objects stored in an NSArray called telephoneArray. I fetch the values for the key number and then replace the NSDictionary I've just read with a new object at the same index in the array. I then want to put these new objects into an NSSet. How can this be achieved? See my unsuccessful attempt below.
...
So a client right now is asking me to send requests that are synchronous to an example he gave me that is in Coldfusion, and seeing as I have no real experience with Coldfusion I was wondering how I could run the following command(request?) on the iPhone:
<cfhttp method="post" username="6Z3YcQhPTZWcCHG0o9OcFA" url="https://url.com/api/d...
Hi guys,
Can anyone suggest me how to work with contact importing in Iphone sdk?
I mean to import the address book into my application.
Thanks.
...
I'm writing a Cocoa application where I have an auto generated app delegate:(MyAppDelegate.h/MyAppDelegate.m)
So I am not sure of the best way to structure the class files for this Cocoa application. I understand MVC thoroughly (on the iPhone) but I'm having a block as to try organising the source properly in a Cocoa app.
I need to spa...
I want to implement a view in an iPhone application that is essentially like a rich text document. I need it to be click-editable, and I'd like to be able to embed graphic objects (either an overlaid view object, or manually drawn in graphic) with the text wrapping around. much like you would expect in a word processor. That's about t...
I have taken char data into database into array. now i want to convert that data into string.
how can i convert array data into NSString.
...
HI,
i have googled and came to know that how to use the variable arguments. but i want to pass my variable arguments to another method. i m getting errors. how to do that ?
-(void) aMethod:(NSString *) a, ... {
[self anotherMethod:a];
// i m doing this but getting error. how to pass complete vararg to anotherMethod
}
...
I cannot find this in the Apple docs so: what does the "f" after the numbers here indicate? Is this from C or Objective-C? Is there any difference in not adding this to a constant number?
CGRect frame = CGRectMake(0.0f, 0.0f, 320.0f, 50.0f);
Can you explain why I wouldn't just write:
CGRect frame = CGRectMake(0, 0, 320, 50);
...
I'd like to create a dragster/dropzone like dock menu. Looks a bit like a stack with a nsview in it.
After a lot if documentation searching and googling I've found a way to determine a dock icon's location.
(http://cocoadev.com/forums/comments.php?DiscussionID=1431)
Is nzbdrop creating a view which just looks like an stack to display...
I am using the following code to set the badgevalue in current tab bar but its not visible in tab bar
self.navigationController.tabBarItem.badgeValue = @"1"
what is the correct way of putting the badge value in the tab bar.
...
How to open a camera by clicking on the table view cell in an iPhone application?
...
Hello,
I've heard that apple drops a lot of app submissions due to their stiff terms.
I dont want to get too far with my project because i know that it will be hard
to rewrite it later.
Now i began rewriting it to Objective-C (from c++) because i got somehow the
impression that apple takes only pure objective-c code. In some places on t...
Hey,
one part of my applikation covers an MkMapview. Therefore i load a list of geocode information from my server and place each tuple as a MkAnnotation pin on my map. After being placed each MkAnnotation object will be released.
Now i want to search for a specific MkAnnotation already being placed on my map and if available popup the a...
I'm trying to write something similar to this (sorry if the sample is not 100% correct, im just writing off the top of me head):
interface Handler
{
void doSomething ( );
}
otherclass
{
void othermethod ( Handler handler )
{
// Handler do something
}
}
So in ObjectiveC I made the following:
@protocol Handler
-...