Tag: xcode

UILocationNotification not obeying daylight savings

I am scheduling local notifications like so + (void) addLocalNotification: (Event *) event { UILocalNotification *localNotif = [[UILocalNotification alloc] init]; localNotif.fireDate = event.scheduleTime; localNotif.alertBody = @”Time to apply drops\nPlease press view to see details”; localNotif.soundName = ALARM_SOUND_FILE; localNotif.timeZone = [NSTimeZone localTimeZone]; localNotif.applicationIconBadgeNumber = 1; NSDictionary * dict = [NSDictionary dictionaryWithObjectsAndKeys:event.number,LN_EVENT_KEY, ACTION_EVENT, LN_ACTION_KEY, nil]; localNotif.userInfo = […]

Max Image Width and Height in Xcode?

I could have sworn that I seen a while back that the max image size you can load into Xcode was 1024 x 1024, meaning you can’t use images that are larger than this, but I can’t remember where I seen it and I was hoping someone could verify or refute this statement for me? […]

keyboard hides textfield for different orientation in ipad

In my iPad application, I have few textView and textField’s. When I click on textField, the keyboard covers the textField. So I am implementing the below code to move the textview up. But on rotation to portraitUpsideDown its not working fine. It slides the screen down in opposite direction. So how do I solve this […]

how to change colour of loading icon

I want to change the colour of the loading icon that comes up after pulling to refresh this is my code for the indicatorviewstyle i think this is related to doing what i want but i didnt write the code, its from: https://github.com/Sephiroth87/ODRefreshControl -(void)setActivityIndicatorViewStyle: (UIActivityIndicatorViewStyle)activityIndicatorViewStyle { if ([_activity isKindOfClass:[UIActivityIndicatorView class]]) { [(UIActivityIndicatorView *)_activity setActivityIndicatorViewStyle:activityIndicatorViewStyle]; } […]

XCode compiler doesn't set my variable (and pointer) initial value to 0 or nil!

sthis is very annoying, since now my values are stored as if they contain somethin by default (like in c). All my OO stuff are now broken since my delegate are always somethin. I was wonderin why XCode do this to me, since by default XCode always set the variable value to 0 or nil. […]

What unit is used by the Scene Editor in Xcode?

The Scene Editor in Xcode displays sizes but no unit. Is it a size in inches or a size in meters? For instance, when I select a node, e.g. a box, when I inspect its properties in the Node Inspector and I check its size in the “Transforms” section next to “Bounding Box”, no unit […]

Change background color with a variable iOS

I want to change the background color of my label with a variable how can I do that ? This is my code but I’d like to have a variable instead of ‘redColor’ [publisherLabel setBackgroundColor:[UIColor redColor]];

How add a UIButton on every image of image view which is in scroll view?

i have an iPhone app in which i have several images. These images add in image view. That image view add sub view with scroll view. Now i want to add a transparent button on every image. How can i do that? I have shown my code below: – (void)layoutScrollImages{ UIImageView *view = nil; NSArray […]

SQLITE Database Error 14

I’m developing a game where there are 4 buildings and in these buildings, there are 3 stages inside. The player can play the stages one by one, from one building to another, however, when they have finished one cycle (eg. going from building 1 stage 1 to building 4 stage 3) I keep getting this […]

Setting constraints to UIScrollView

Need some help to set constraints to UIScrollView. I tried to follow the instructions here: https://developer.apple.com/library/ios/technotes/tn2154/_index.html (Mixed approach). Setting 4 sided constraints to UIScrollView. Then set 4 sided constraints to the buttonContainer. This the result: However xcode is giving this error message: If I try xcode’s recommendation, either the scrollview will not scroll, or it […]