Tag: ios

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]; } […]

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]];

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 […]

1st ViewController in Portrait and SecondViewController in Landscape Mode

My requirement is this my 1st viewcontroller open in Portrait mode only.and when user goes to 2nd viewcontroller i want that controller in Landscape mode how may i do this i tried this code 1st ViewController.m – (BOOL)shouldAutorotate { returnc YES; } -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { return UIInterfaceOrientationMaskPortrait; } -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface { return (interface==UIInterfaceOrientationMaskPortrait); } […]

Sending “NSString *_strong*to parameter of type _unsafe_unretained id* ”change retain/release properties of pointer

Im getting the following error Sending “NSString *_strong*to parameter of type _unsafe_unretained id* “changes retain/release properties of pointer … in the following line: [theDict getObjects:values andKeys:keys]; Im trying to add an address from contacts to my app. Could someone explain to me what its complaining about? I think its an ARC issue, possibly to do […]

Align text fields using dynamic constraints

I’ve been learning how to make iOS apps, and have come across a minor annoyance. I can’t find an easy way to align my text inputs. Looking at the below screenshot, you will see that I’ve managed to align my text fields, which is what I want. However, I did this manually by changing the […]

committing project to source control in Xcode

In Xcode 4, order to commit the entire project(all source files) to the source control repo, does one have to select all the files in the project navigator(Cmd-A) or is is it sufficient if I select just the Project file at the top and then File->SourceControl->Commit?

My player stops after playing first song

I am using AVPlayer when i select multiple songs from my ipod library ,those selected songs are displayed in a UITableview called playlistTableView as soon as the first song plays out it doesnt continue with second song .. I want the player to continue playing songs till there are no songs left in playlistTableView .

Error while using AVAudioSession in ios

I used these codes – (void)viewDidLoad { [[AVAudioSession sharedInstance] setDelegate: self]; [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil]; AudioSessionAddPropertyListener ( kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, self ); NSError *activationError = nil; [[AVAudioSession sharedInstance] setActive: YES error: &activationError]; } and void audioRouteChangeListenerCallback (void *inUserData, AudioSessionPropertyID inPropertyID, UInt32 inPropertyValueSize, const void *inPropertyValue ) { // ensure that this callback was invoked […]

custom viewcontroller delegate not working

i’m having issues on my custom delegate, not sure why is not working.i wan to pass the delegate to the mainview so it will auto push to a detail view after adding a new record. Not sure what i have missed out.i’m doing all the linkage with storyboard & iOS 5. thanks for looking and […]