Tag: ios

Passing data from Marker to other VC

At the beggining of this post I would like thank @Nirav D for help 🙂 Ok. So the problem. There is a class i want to pass with prepareForSegue func with google marker. How to do it?

CLLocation current location not working

I have this code in my class ViewController: CLLocationManager *locationManager; – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. locationManager = [[CLLocationManager alloc] init]; [locationManager requestWhenInUseAuthorization]; } – (IBAction)getCurrentLocation:(id)sender { locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; [locationManager startUpdatingLocation]; } #pragma mark – CLLocationManagerDelegate -(void) locationManager:(CLLocationManager *)manager […]

Multiple IBOutlets in same line of same type in Swift

In objective c you can declare IBOutlets in below mentioned manner: IBOutlet UIButton *btn1, *btn2, *btn3; And you can able to bind these buttons in storyboard. Now I want to use the same terminology in Swift. I want to declare these 3 buttons in same line rather than declaring these in 3 different lines. I […]

How to add items to an Outlet Collection in Xcode

I am creating a quiz app and for the buttons I need an outlet collection. So far in the array, I only have one button but I want to add the other three. On the other tutorial I’ve watched, it says to click the button on the side and drag to the thing you want […]

How to do AES 128 encryption of a string on swift XCODE and send it as POST to the server?

How to do AES 128 encryption of a string on swift XCODE and send it as POST to the server?… I am new to XCODE and am learning to encrypt the string data and want to send to HTTP server. It is a basic iOS app for sending Latitude and Longitude of the device.

iOS Pre-build action to change plist value based on Scheme

I have an iOS application that is using the Agentry framework to define the Agentry server URL to connect. The agentryServerURL parameter is included in a separate branding.plist file as per the SAP specs. What I am trying to do is tie my iOS schemes for the different environments to a pre-build action in order […]

UITableViewCell reusability issue. Modifying one cell is affecting others

Whenever a cell from section 3 is selected. I’m updating the DataSource array, and the cell’s background color is thus changing correctly. However, whenever I scroll back up I start seeing random cells with the modified background color, knowing that I don’t even mention it in my cellForRowAtIndexPath method and each section in my tableView […]

Set Action for UITabBarItem

How can i set an action for my UITabBarItem ? Can i connect it from storyboard to code somehow? or programmatically? And if so how can it be done? My hierarchy is UITabBarController -> UINavigationController -> UITabBarItem Sorry for the noobish question but i really need an answer for this. And I couldn’t find anything […]

My Xcode 7.3 compiler is constantly breaking and causing extremely long Build and Compile times

This Issue Occurred On A SpriteKit Xcode Project I have an issue with Swift where, once my project reaches a certain level of complexity where I have tons of classes and methods around, my autocompletion breaks so that “Jump To Definition” ceases to work and my IDE is reduced to the usefulness of a basic […]

UISwitch/UISlider values when switching ViewControllers

How would you keep the value of a UISwitch or UISlider so that when you leave and come back to the ViewController it will have the same value as you left it at? I don’t have much knowledge or experience with swift so if you can, please explain in Objective-C!