I have a segmented control that alters 5 images on one of my View Controllers (see image below) but I want Segment 0 to be selected straight away when someone goes into the Casting Tab. At present it only gets selected when i go onto either Segment 1
This question already has an answer here: Delete all keys from a NSUserDefaults dictionary iOS 14 answers I have this code to remove all UserDefaults data from the app: let domain = Bundle.main.bundleIdentifier! UserDefaults.standard.removePersistent
I've created a PFQuery to get some strings from my parse server and the put this in a couple of arrays var packsAvailable = [""] var packsImage = [""] var packsDescription = [""] If I print the value of the array in the for l
I'm looking for the specific location in the filesystem of the iOS simulators that were downloaded via Xcode. I've been looking in the usual locations like /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs o
I have a function I was using in Xcode 8 Beta, which sorted an array alphabetically then numerically. The function I used was: func sortArray(arrayToSort: [String])->[String]{ let sortedArray = arrayToSort.sorted { (first, second) in first.compare(se
I have some difficult to convert my Swift 2.2 app to Swift 3.0. I have some errors and I don't find the solution yet. Currently, my worst problem is with NSFastEnumerationIteration, I try to get records from JSON but with this error I can't. This is
I have connected Barcode Scanner device Barcode Scanner Information I want to know the paired status of it. Whether it is connected with device or not. - (void) centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripher
When i'm start to write anything in textField the search button show in header. -(IBAction)actionCloseKeyboard:(id)sender { [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationCurveEaseOut animations:^{ [self adjustLayout:[[UIApplication s
How can I scroll my table view to the bottom when using dynamic cell height? For some reason this code does not work in this scenario: [self.tableView scrollRectToVisible:CGRectMake(0, self.tableView.contentSize.height - self.tableView.bounds.size.he
I have a TableView having multiple custom cell. I want to add custom View on top of the cell runtime. I have cell like this. Now I want to add the HR Channel top view on the same cell runtime so that the it should look like this. As example : Think a
I am trying to get just one more icon into my Navigation Bar, but can't figure out how to adjust the width to get more room. Using standard BarButtonItems and using the storyboard to build, there seems to be a limit of 14 icons in portrait mode on iP
I have an app (with a UITabBarController) that can reach the final payment view via two tabs, each with their own NavigationController. (The illustration only shows the two tabs in question) When payment is successful I want to reset both NavigationC
I've a simple question: How can I make the message of an UIAlertController be selectable and copyable by the user? The controller is initiated like so: let alertController = UIAlertController(title: "Hello World", message: "Copy Me!",
I want to set the color of UINavigationBar to black with alpha 0.6 to see my interface. But if i use this code: self.navigationController?.navigationBar.barTintColor = UIColor(red: 0/255, green: 0/255, blue: 0/255, alpha: 0.6) self.navigationControll
If my app is running on foreground or background this working fine. I am receiving the notifications and save it on the local database. But if the app killed from the background it receives the remote notifications but the following method is not cal
I have built a self destructing messaging app with Parse.com and now i want to create a blocking feature to stop any unwanted messages from people i do not want messaging me. what i already have: NSString *usernameBlock = [self.blockUser.text]; PFUse
i have my login screen how ever i can able to skip that screen and go to home page when i am in the home page i could`d able to get my navigation controller in my home page i have embedded navigation controller with my login page have connectivity vi
According to View Controller Programming Guide, we can explicitly unload self.view from UIViewController by assigning nil to self.view. But in Swift, view property in UIViewController is declared as var view: UIView It's not UIView! and thus followin
How do I create an empty SKSpriteNode in Swift? I need a SKSpriteNode which I can add SKSpriteNode children to. The equivalent of this in Objective-C: SKSpriteNode *textSprite = [SKSpriteNode new]; Let type inference do the work of figuring out the t
I am developing small application in iOS (I am complete beginner). I have made a menu Core Data entity where I have categoryName and imageNamed saved. I want my UICollectionView in sections. But I am stuck in defining different indexPaths for differe
I'm have been trying to get the header of the table scrolling along with the UITableView. It's finally working, however, now there's a whitespace showing up right under the map view (see screenshot). I had difficulty getting the map in the table head
I'm making a game and when I close the app (close at multitask manager), all my data is gone! So, My question is very simple: How do I save the data?Let's say you want to save score and level, which are both properties of an object called dataHolder.
I m trying to upload an Image from iPhone to Server. I m Able to Do so But i need to show an Indicator.My code is NSData *imageData = UIImageJPEGRepresentation(newImage, 90); // setting up the URL to post to NSString *urlString = [NSString stringWith
I've make a custom keyboard for a UITextField, consisting of 18 UIButtons. It's a UIView which is set as the text field's inputView. The buttons are created in the initWithFrame: method of the UIView using the code UIImage* buttonImage =[[UIImage ima
I have a on top of my tableview another view with 3 buttons on it. You can see my storyboard over here. When I build and run. This view shows up at the bottom of my tableview. Someone has an idea how this is possible? Kind regards.Your UIView is subv
I have an App in my Device, that contains database, if I update that app from the App Store, then database of App will be updated or it uses the same database of previous App.If you stored your data in NSDocumentDirectory or NSLibraryDirectory, your
Im working on a app that generates large files (100Mb+) that I would like to upload to a web server. By loading the file in to a NSData object that will kill the app due to memory usage (which is the only way I see in the AFNetworking docs), is there
i use two blocks to draw some buttons on my subview dynamically. One calculates frames for Portrait mode and the other does for Landscape. It works well but when i rotate, it writes over the old ones. Hence, some of my buttons come twice. Here is my
JewelsSharedController.m: -(void)GetCountries:(id)sender detailDictionary:(id)details { } and I want to call this function in RootViewController's function like RootController.m: -(void)soapresult { //i want to call ""GetContries "" he
I understand that not all information is official yet, and that some information about the new OS is under lock and key, but is it publicly known yet whether the iCloud API will support iOS app access to the user's cloud music library?It has not been