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.
...
So I've got json-framework up and running on my project, but need help figuring out how to use it to parse this json string:
[ { "id":"0", "name":"name", "info":"This is info", "tags":[ { "id":"36", "tag":"test tag" }, { "id":"37", "tag":" tag 2" } ], "other":"nil" }, { "id":"1", "name":"name", "info":"This is info", "tags":[ { "id":"36...
If I add a gesture recognizer to a table cell called cell, e.g.:
UILongPressGestureRecognizer *_longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(cellGestureRecognized:)];
_longPressRecognizer.allowableMovement = 20;
_longPressRecognizer.minimumPressDuration = 1.0f;
[cell addGestureRecogniz...
I have created a MapView in the main view and want to use the same MapView in the flipside view but only expanded in size. The code draws the mapview in the flipside using the global map instead of the constrained map in the main view.
Any suggestions?
I have tried duplicating the mapping code in the flipside view but the flipside vie...
Hi,
I am using a custom class to display some info on a table view.
The problem is that as long as I scroll the tableview memory is leaking...
I guess I have something wrong at my class.
Please have a look:
@interface Person : NSObject {
NSString *name;
NSString *surname;
NSString *address;
NSString *email;
}
@property (n...
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 ...
Hi,
I want to get a callback when my UIPinchGestureRecognizer finished a pinch-gesture. Moreover it would be great to know if the finished gesture was a zoom in or a zoom out.
Does anyone know a method to use? Or the approach to do?
Thanks!
...
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...
I'm having a nightmare with the rotation on iPad. I've searched all over the place for some tutorials, but nothing seems to really be for what I want. (Possibly not searching for the right thing?!)
I have a portrait view by default which is an image and a button inside the view. When I rotate, I detect this can work out if it's landsca...
[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
...
I'm trying to support older iOS versions in my app. I initially thought I only have to set those frameworks to "weak linking" that are not present in the older OS, e.g. the iAd framework. And then make sure that I don't call unsupported APIs in the code. However, when I try to run the app (which is compiled with the most recent framework...
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 everyone, I have an annoying situation here: I have updated my mac from Tiger to Snow Leopard, and my XCode has also been upgraded from from XCode 3.1.3 - SDK 3.0 to XCode 3.2.3 - SDK 4.0.1. The problem is: I can't run my projects anymore. The SDK 3.0 can not be found (and I have already read in Internet that there is no SDK 3.0 av...
I have this code in my TNApplicationDelegatePad class:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
splitViewController = [[UISplitViewController alloc] init];
TNFeedListViewController...
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. ...