I have a UIToolbar that contains 2 buttons. The toolbar has a tint:
toolbar.tintColor = [UIColor colorWithRed:(102.0/255.0) green:(20.0/255.0) blue:(11.0/255.0) alpha:1];
How can I make the buttons have a similar tint color?
...
I have a UIViewController that is presented modally. The UIViewController is inside of a UINavigationController.
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save"
...
I have a UIMenuController calling a modal view, however the context menu doesn't hide itself upon calling the modal view. The context menu always hides itself when it's out of focus. I don't think this is the right behavior.
...
I can define and resolve dynamic method without any errors or warnings with @property, @dynamic and -resolveInstanceMethod:
However, they're instance methods, but I want to resolve class method dynamically. How can I archive this?
...
If I use a performSelectorOnMainThread call inside a detached thread, when does the main thread execute the request? Does it do so immediately after it finishes the current main thread operation, or is there some other type of hierarchy that determines when the performSelectorOnMainThread call executes?
...
hi all, i have a stupid question...sometimes i see developers use the following code...
NSString *newURL = [_parameters objectForKey:@"url"];
when i use this i get error... here what is _parameters and how to declare it??
i can provide more example..
NSLog(@"SaveImage Called");
//google code for turning base64 into u...
Hi everyone, I am making custom NSScrollers for use in NSScrollView. But when any of the superviews of the NSScroller gets Core Animation enabled. I get this drawing issue that's a huge nuisance. Whenever i scroll into the corners of the scroll view the scrollers clip. But if a scroller starts out drawing in the corner, the scroller part...
Hi Experts,
First m very sorry!! for that i m asking question again related to accessing data from server.
i am new in iphone and am making a application in which require to access mysql database which is hosted on remote server,
I take a server and create our database on the server
so i have URL of the server,User Name,Password,Port...
Hello,
I have created a UIColor object and want to set the colors before drawing using CGContextSetRGBStrokeColor. In order to do that I need to extract the values of red, green and blue from the UIColor object. How do I do that?
Or is there perhaps a better way defining the color using some other kind of methods (couldn't find when ...
ABAddressBookRef _addressBookRef = ABAddressBookCreate ();
NSArray* allPeople = (NSArray *)ABAddressBookCopyArrayOfAllPeople(_addressBookRef);
NSMutableArray* _allItems = [[NSMutableArray alloc] initWithCapacity:[allPeople count]]; // capacity is only a rough guess, but better than nothing
for (id record in allPeople) {
CFTypeRef pho...
Hi all,
i succeed to call a objective c method from a javascript method...using the following
///javascript
function hi()
{
CallNKitAction("callFromJavascript className=TestCarouselViewController&index="+index);
}
hi();
////objective c
-(void)callFromJavascript
{
NSLog(@"Before:%f",refToSelf.caro...
[Number.editable = NO];
[Number resignFirstResponder];
[Password.editable = NO];
[Password resignFirstResponder];
I am getting the error
Request for member 'editable' in something not a structure or union
:S
Thanks
...
How do I retrieve an int from NSUserDefaults?
I have the following code
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
NSArray *prefs = [def arrayForKey:@"addedFavs"];
favList = [[NSMutableArray alloc] initWithArray:prefs];
If I try this
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
int tempInt = [de...
Hello,
I'm trying to set a property like so -
-interface:
@property (readwrite, assign) CGColorRef otherBallColor;
-someMethod:
CGColorRef ballColor = [UIColor colorWithRed:255.0/256.0 green:165.0/256.0 blue:239.0/256.0 alpha:1.0].CGColor;
[self setOtherBallColor:ballColor];
As soon as I try to access the value it crashes -
-s...
I'm working on an iPhone game that uses the accelerometer for control. I don't have an Apple Developer Program user yet, so I can't test it on my device, so I'm trying to give the game some accelerometer values depending on where I tap on the screen.
What I tried to do:
I tried to have the middle of the screen as a mid point, then the o...
hi everyone,
i wrote a gps-application for the iphone and it all works fine but now i want to send the latitude and longitude to a server over the internet using the most simple way... I have a url from the server in which there are parameters for latitude and longitude. Also i want the lat. and long. to be sent every 90 seconds or so. ...
hi !
so in my viewdidload i got something like
[nameTextField becomeFirstResponder]
now after a button gets klicked, i want to slide out the keyboard of this textfield, and slide another keyboard of another textfield in.
i thought about
[nameTextField resignFirstResponder];
[dateTextField becomeFirstResponder];
but the other keyb...
hello,
I am trying to modify the default behavior of teh dock when you click on an icon of a started application. By default it bring the main window of the application to forefront.
What I would like to be able to do is to be able to perform a custom operation when the icon is clicked.
Any idea to achieve this?
Thanks and regards,
A...
Hello, I'm making an application for someone, and I need to make this NSTextView in an NSScrollView uneditable. Whatever I do, I just can't get anything to work. There is no editable or allow editing check box in Interface Builder for it, so I'll to do it programmatically. So far, I have tried the follow codes.
[TextView setEditable:NO]...
Let's say I've got a folder in my project with bunch of png files in it (or mp3 files, or mov files etc).
I would like to create an NSArray populated with the items within that folder... for instance an array of UIImages for the folder of images (or just an array of NSStrings of the image name).
Is this possible? I know I could create ...