-(void)myButtonclick {
NSString *data=[[NSString alloc]initWithString:@"YES U PRESSED BUTTON"];
UIButton *refreshbutton=[UIButton buttonWithType:UIButtonTypeCustom];
[refreshbutton setFrame:CGRectMake(15.0f, 330.0f, 150.0f, 32.0f)];
[refreshbutton setCenter:CGPointMake(80.0f,340)];
[refreshbutton setBackgroundImag...
How can i use push notification in my iphone application.can u please help me by given some source or instruction to include my application.
...
Hi guys,
I'm using the ASIHTTPRequest package to send some data from the iPhone to my server and then when saved on server I recieve a response (a string) containing a url that I want to load in a webview. In theory this should be simple, but in reality I can't get this work at all. Seems to be some problems with encoding of the string I...
Hello, I'm a beginner in Objective-C and I'm trying to make a clock. I'm just testing at the moment and my problem is that for each loop the needle rotates from its initial position but not from the last position. So, my question is how to make the next rotation in the for loop from the last position the needle got?
Help me please, i'm ...
What is the Objective-C equivalent of Java packages? How do you group and organize your classes in Objective-C?
...
Hi,
I asked a question on here last week and I have tried to follow examples but not having much joy,
So I am trying to create a app that will have a main window. In this window I want to be able to display 3 or 4 different views (not at the same time) which the user can select the view via a button press. I did not want to use a navi...
upon being asked about subscribing to hardcopy periodicals concerning Macintosh development, I could only think of 'MacTech'.
are there any others? (and are they any good?)
thanks for your opinions.
...
Hi!!
I have one mainViewController that is also a delegate for a pickerview contained in the mainView.
I have also another view that contains a coverflow. I want to add the coverflow to my main view and make the mainViewController it's delegate. I do not know if it is possible. I used the following with no success:
@interface MainVie...
Hey All,
I'm implementing a singleton class as follows:
static Singleton* _singletonInstance;
@implementation Singleton
+(void)initialize
{
_singletonInstance = [[Singleton alloc] init];
}
+(Singleton*)instance
{
return(_singletonInstance);
}
initialize only gets called the first time someone calls instance. I then have ...
So im using presentModalViewController and dismissModalViewController with animation set to "YES" in both cases. Which works fine.
However, after the modal view is dismissed, all of the content on the main view has moved down what looks like 20px.
Would anyone have ANY idea on what could be going on with that?
...
Background:
I'm creating a hierarchy of composite dictionary data structures in Objective-C, and am inheriting from NSMutableDictionary so these classes can be used everywhere an NSDictionary/NSMutableDictionary is called for. (Just so people don't think I'm reinventing the wheel, each one uses a CFMutableDictionaryRef, plus some additi...
I have seen code (probably Apple's own sample code) written in such a way where it releases the ivar in dealloc and setting the property in viewDidUnload.
e.g.
(void)viewDidUnload
{
self.navigationController = nil;
}
(void)dealloc
{
[_navigationController release];
}
Why do them in two places? Also, why set nil in one and release in...
With Mac OS X Server's included (or freely available) tools, a background in Objective-C and some rusty familiarity with scripting languages...how might one go about "easily" employing REST**ful **JSON services under Mac OS X Server?
This is mostly for prototyping so simplicity and GUI tools are appealing though not at the expense of a ...
I have an XML reader class which I initialize with a URL
- (id)initWithURL:(NSURL *)url
This class adds objects to an array in the calling class using an instance variable
// in the interface
ViewController *viewController;
// in the implementation
[viewController addObject:theObject];
Now, I initialize my XML reader class, then s...
I am interested in knowing whether I can expect the observing object's method to be pushed onto the stack before the posting object's method has been completed and removed.
...
okay, I know I am new to obj-c, but for all intents and purposes the following below SEEMS like it should work:
songCollection = [[NSMutableArray alloc] init];
[songCollection addObject:@"test"];
//Array is init, and I can see it in the debugger.
songCollection = [GeneralFunctions getJSONAsArray:@"library"];
// I can see...
I'm working on learning Objective-C, and I'm trying to get a feel for the memory management. I'm fairly familiar with C memory management, but I'm trying to figure out how different ObjC is.
Let's say I have a class called Complex that is used for holding complex numbers, which has a method -(Complex*)add:(Complex*)c; that adds the pass...
I'm just starting to use multithreading and was looking for a good explanation. I'm not sure if there are differences in how multithreading works on Macs and iPhones. Does anyone have a good link to tutorials with example code?
Thanks.
...
i want to add a search bar under the navigation bar with uitableview.
and i want to search from the database?
any idea how to do this
...
This is probably a silly and easy question, but it seems sometimes the simplest things give me more problems!
This formula is suppose to give me a number between 0 and 100.
(200 / 23) * Abs(Mod(2987, 23) - 23 / 2)
In objective C I coded it like this:
(200 / 23) * abs(2987 % 23) - (23 / 2);
Is the formula flawed (and doesn't give a...