How can i take an UIImage and give it a black border programmatically?
How can i take an UIImage and give it a black border programmatically? If i can receive code, it will be great. tnx ...
How can i take an UIImage and give it a black border programmatically? If i can receive code, it will be great. tnx ...
I've got a very simple line of code in Objective-C: if ((selectedEntity != nil) && [selectedEntity isKindOfClass:[MobileEntity class]]) Occasionally and for no reason I can tell, the game crashes on this line of code with an EXC-BAD-ACCESS. It usually seems to be about the time when something gets removed from the playing field, so I'...
In Ruby, when referring to the "downcase" method of the class "String", I write String#downcase. When talking about the "new" class method, I write String.new. Is there something similar for Objective-C? ...
I have been wanting to make a circular preloader in my iPhone app, but have been struggling where to get started. I was using Sequel Pro today and saw that they had exactly what I wanted and it's open source, so I downloaded the source and couldn't find anything. I am just looking for a start on how to make something along the lines of:...
I am trying randomly generate a positive or negative number and rather then worry about the bigger range I am hoping to randomly generate either 1 or -1 to just multiply by my other random number. I know this can be done with a longer rule of generating 0 or 1 and then checking return and using that to either multiply by 1 or -1. Hop...
I have an iPhone app, and I'm taking a few features of the app and creating a new app. What's the appropriate way to build two apps from a common code base? ...
Hiii Can you plz give me the code how to implement two action sheets in a same file using objective c v2.02 it is causing error that both actin sheets methods work together and cause exception ...
I am working on an app whose main window has an NSDrawer. It is crucial that the drawer will always open on the right edge, and that is how I have coded it to work. What I would like to know is if there is a way to detect if the drawer will open "off the screen"... Is there a way that I can detect this? If so, how? And additionally how c...
Hey, I have troubles using a foreign protocol in Objective-C. Is there any other solution than adding additional Protocols? Example: Class1.h #import "Class2.h" @protocol Class1Delegate <NSObject> @required -(NSArray*) someMethod; @end @interface Class1 : NSObject { Class2 *variable; } ... Class2.h #impor...
I'd like to play a synthesised sound in an iPhone. Instead of using a pre-recorded sound and using SystemSoundID to play an existing binary, I'd like to synthesise it. Partially, that's because I want to be able to play the sound continuously (e.g. when the user's finger is on the screen) instead of a one-off sound sample. If I wanted t...
hi, i am making an application of iphone, in which i have a table view, on every row of table view i have created a button programmatically & on its click method am showing picker view. Picker view showing perfectly, on picker view's toolbar i have 2 barbuttonitem named Done & Cancel. i have added below code in Picker view's delegate met...
Hello together, I have an application, it worked on the iPhone OS 3.0 with SDK 3.0. with iPhone OS 3.0.1 I did the update and it seems o.k.: ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0\ (7A341) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1 But when I want to install my application on the device I get: ...
I am trying to make my app check the text in a text box and see if it matches any of the strings in an NSArray. I'm hoping you could point me in the right direction or give me some code to do it. I am pretty sure that I would need to use an if statement. Thanks! ...
I have four variations of the same class. A mix of pointer, non-pointer, assign vs copy. What are the implications of using each case? 1) @interface fruit:NSObject{ NSString apple; } @property(nonatomic, retain); @end 2) @interface fruit:NSObject{ NSString apple; } @property(nonatomic, assign); @end 3) @interface fruit:NSObj...
Hey, every UIViewController has a method called willRotateToInterface. Is it possible to do this within a UIView too? Does this match the idea of model view controller ? The only way I can think of is to send the event from the UIViewController to the UIView. Is there a global variable for the current orientation? ...
I am trying to load an SWF inside a WebView in my cococa app, it works fine when I load an HTML which references the SWF. But i'd like do load the flash file alone, with no HTML. Is that possible?? ...
I am trying to learn about Cocotron but I have found very few useful resources outside of the Cocotron website. Can anyone point toward some useful resource that might help me get started. ...
I mean the fundamental runtime. How is method dispatching implemented (via a selector hashtable?). What is a selector anyway? How is the object model as you can add methods later with some low level API etc. I need to look at it from a compiler programming point of view, not a simple user of the language. ...
I am interested in detecting the MIME-type for a file in the documents directory of my iPhone application. A search through the docs did not provide any answers. ...
I have a UIImageView object created in IB, and has an outlet. I want to move it, but only change the y value, so I have: CGFloat x, w, h; x = image.frame.origin.x; w = image.frame.size.width; h = image.frame.size.height; image.frame = CGRectMake(x, /*formula to figure out new y value*/, w, h); When this runs, the image simply disappea...