I am trying to do something that should be really simple. I want to add a gradient to one of my views. I can add it to self.view, but not to viewWithGradient. Here is the code:
CAGradientLayer *gradient = [CAGradientLayer layer];
UIColor *colorFirst = [UIColor colorWithWhite:0.10 alpha:0.15];
UIColor *colorLast = [UIColor colo...
I have a situation where I'm lazy loading images from the www.
It's a list of items, when one item is tapped, a detail view is pushed to a nav controller.
In that detail view the item has an image, which first is a default image, and I want to start loading it's image from a URL.
So what I do is create an object which once initialized ...
This shouldn't be this confusing. I have a custom UIView with a bunch on controls on it. UILabels, buttons, etc. I've created this Nib using Interface Builder. I want to be able to position this custom uiview on another UIView using the interface builder.
How do I link my UIView custom class, to the nib? initWithCoder gets called, ...
Hi everybody:
I am trying to add a Python script to into my project to obtain the build and marketing numbers directly from Git.
I have created a new target phase and that runs a script as explained in:
http://yeahrightkeller.com/2008/10/19/xcode-run-script-build-phase-tip/
And I have written a Python script that parses the program In...
I'm implementing shake gestures as described in this answer however if I shake my phone for longer than a second, motionEnded doesn't get called.
Is there not a 1-to-1 ratio of motionBegan and motionEnded events guaranteed by the OS,
or is this a problem with the responder chain and events are getting sent elsewhere?
...
I have a UIWebView in my app and I am having trouble making it work correctly simultaneously with landscape and the viewport zoom.
If I load pages in portrait and then rotate the phone, using the autoresize, it works correctly, zooming in for pages that are set to zoom. However, if I start the webview in landscape mode, I have to rotat...
Hi. Im having a bit of trouble right now adding the same image multiple times and removing it all at one time after the gamelooop.
I manage to add the image by creating 1 UIImageview for every image but i know thats its not the practical way memory wise since im allocating a lot of uiimageview with the same image.
I use this code to load...
I'm trying to create dynamic graphics for my game, which I'm building with Cocos2D. The graphics generation will occur at predictable, finite points, such as level loading. I'm having a hard time figuring out how to actually draw this at runtime. From what I can tell, the easiest way would be to draw into a PNG file at runtime and then l...
I'm trying to block all user input in my app. That includes touch event,sleep button, home button, etc. It's for jailbroken device. So you can use whatever that works.
Thank you!
...
The iPhone i'm developing with (building the application to, not installed via ad-hoc) receives push notifications as it should. I've got an application that just sends dummy push notifications on command, and the dev iphone receives them consistently. However, I've distributed a beta build under the release configuration to several co...
hi, how can i change the UIImage's Color through Programming,any help pls?if i send UIImage,
its color must be changed ..any help please?
if i change rgb color like the following through bitmaphandling it did not work.i have given blackcolor's RGB value like 0,0,0.....
...
Hi All,
I need to reduce the font size of the table view header. My string value is a little bit longer and it doesnot fit in to the header. so planning to reduce the size. Any one knows how to reduce the size, so that i can add the string to my table view header.
Thanks in advance,
Shibin
...
Hi
I have a navigationController, I push a new viewController onto it's stack, I have been trying to figure out a way to switch this ViewController with another viewController from within the first ViewController.
I have 3 almost identical views, depending on the user interaction I would like to be able to switch between these views wi...
i have an app that runs like a dream on a 3gs, but can be a bit glitchy on the ipod touch, anyone have any similiar experiences, with distribution?
The app still works, on the ipod touch (which is a year old, forgotten which gen), but just not as well.
...
I'm doing something that requires storing some text entered in a UITextView. It all works fine until the text is restored, then it is not wrapped in the UITextView (like it did when it was entered) but is truncated (just like a UITableViewCell does by default, tail truncation).
Once the text is in the UITextView, it is saved to a Core D...
Hi guys
I've almost finished my game for iPhoneOS but in the end i've found a bug and can't fix it
for my sounds in game I use SimpleAudioEngine from Cocos
I have some background musics and sounds
At last designer finished video intro and outro
At begining of video playback I'am setting backgroundmusicvolume to 0
and I'am no touching ...
My viewDidAppear methods is in below.
My view has a activieIndicator that is animating and a imageView.
In viewDidAppear I load an image from my server which will be used as an image of the above imageView.
I want until my image is fully loaded, my view will show the animating indicator.
But I can not do it.
Until full image load, i can ...
I have this:
if (soapResults != nil) {
soapResults = [soapResults stringByAppendingString:@"\n"];
}
But I get a warning:
Assignment from distinct Objective-C type on build.
When I run it on device I get:
Program received signal: "EXC_BAD_ACCESS".
from gdb.
Any ideas how to append a newline to an NSString without getting a warn...
I need some clarification regarding the singleton object implementation in Objective C. I have implemented the following code for the singleton object ..
static MyClass *instance = nil;
+(MyClass *)getInstance
{
@synchronised(self)
{
if(instance == nil)
{
instance = [[self alloc] init];
}
...
When a new view controller is pushed onto the navigation stack, there is standard support for a back button with the title of the previous view controller. This button "points" to the left rather than having a rounded rectanglar shape.
Is there a standard way to create a UIBarButtonItem that "points" to the right? This button would be u...