Newest xcode Questions

Q&A for professional and enthusiast programmers

scroll view animation to prevent keyboard covering text field works in simulator but not on my phone

I have a scroll view with a textField and textView and am using an animation to move the page up so the keyboard doesn't cover them when it pops up. It works perfectly in my simulator on all phone ...

How can I install an app in a tvOS simulator?

I'm building an application for tvOS and would like our QA department to be able to do sanity/smoke tests without necessarily having an Apple TV device. The people in the department can easily get ...

Facebook Live Streaming display in iphone application

i am trying to create a iPhone Application that display video which is stream live on my Facebook page i am not figure out how to display that in my application i create a developer account, Add my ...

Reading html source code in iOS webview for specific variables

I am developing an application where I intercept the html button clicks and call native methods. However, I am having problem reading some variables from the source code. The source code contains some ...

Sliced image repeates in storyboard but when I run the app

I use XCode's image slicing features in assets catalog to set slicing for an image. Then I use this image in storyboard: set it as image of UIImageView. The size of UIImageView is larger than size ...

Swift code to query AWS dynamoDB data base

I am building an app in Swift 2.3 and Xcode 8 and I need my app to query user information from a database (answers to questions they have answered earlier and saved in the database). I have found some ...

How can I change my application database values after application launch?

this is my first IOS application, and I am about to launch it, I have 2 tables one to save some user data in and second one I read some values from it. My question is after launching the application ...

Swift Radio Buttons - CheckBoxes - Swift 3

I work on Swift 3, and I'm trying to make checkboxes that behave like radio buttons. I explain myself : I have 8 buttons ; each has an "unchecked" image and a "checked" image. I want only 1 button to ...

Google Analytics with Swift 3 iOS 9

I tried to find informations about how to use Google Analytics with Swift 3, and even if it looks like some people succeeded, I can't make it work myself. The Google Analytics documentation doesn't ...

Submitting binary for Appstore review with Appstore provisioning and AdHoc Provisioning profile

I have submitted approx 20+ Application on App Store with Ad-Hoc provisioning profile and all have been approved and working perfectly. I just want to make sure that If we submit binary with Ad-Hoc ...

Cannot update embedded child VC from non-parent VC

Up to date Xcode/Swift/iOS. I have a Master VC (called StartVC) that contains a Child VC (called TopBarVC) via and embedded segue. The Child VC contains a button, that, when pressed, modally segues ...

How update a pass on passbook ?

I've created already a pass and sent to my phone without problem ! Now,I would like to know how can I update my pass? PassKit web service? php? what do I need and how to install ? I saw already all ...

Xcode GameScene.sks bringing sprites to front

I feel like this question is very simply resolved, but I can't for the life of me figure out a way to do it. I have 4 sprites of equal size, all at the same coordinates in my GameScene.sks, 0,0. I ...

SceneKit - How do I attach a particle emitter to a node in a scene using the Xcode editor?

I can't figure out how to attach my particle emitter to a node in my scene using the Xcode editor. The documentation says 'You can attach a particle system to a node in the Xcode scene editor to ...

Hype 3 -> Xcode -> Swift 3 -> UIWebView?

I'm doing an iOS app implementing a UIWebView that loads html with Javascript function. I could load the file but the page is blank: I tested the html on Safari and it worked fine: I tried deleting ...

Swift-Binary operator cannot be applied to operands, when converting degrees to radians

I'm aware of some relatively similar questions on this site, but if they do apply to my problem (which I'm not certain they do) then I certainly don't understand them. Here's my problem; var degrees =...

iOS simulator : How can I see the background apps?

How can I see the background apps on iOS simulator ? What is the keyboard shortcut for it or what I have to select from the simulator menu ?

How to find the path of sqlite.sql file and print it?

I know this question already answered before but when I tried to print the path for the sqlite file of my application as below I got the path but could not go to it in finder. I used below code to get ...

Swift 3 - Constrain Button Width

I am wanting to create a simple bar at the top of my view, with two buttons side by side, taking up 50% each. I have created the bar like so: let topTabView = UIView() topTabView....

iOS Distribution Certificate issue in Xcode 8

I donwloaded from Certificates, Identifiers & Profiles in Apple Developers Provision Profiles and in my Xcode 8 I set Automatically manage signing. So Xcode does everything for me. But when I try ...

Mac OS X XPC as IPC between two applications

I have a windowed application and windowless helper, sitting inside the app bundle, and working as login item. App can start and stop the helper, everything woks there. The problem is that I need to ...

Swift-Scale SKAction not working

I'm having some trouble figuring out why my sprites aren't scaling in Swift 3 and Xcode 8. I have 3 identical sprites, ball1, ball2 and ball3, all in the centre of my GameScene.sks and fully visible ...

How to include credentials --user USERNAME:TOKEN in a WebSocket call

I am attempting to access stream data using Starscream web sockets, which is working on traditional calls, but not on the below as I need to have the --user USERNAME:TOKEN curl --user USERNAME:TOKEN ...

Select and crop face image from photo image (ios)

I'm trying to get cropped image from photo. I have the following code that crop image that was got from ios face detection sdk: - (UIImage *)scaleAndRotateImage:(CIFeature *)ciFeature image:(UIImage *...

Swift - Troubles with API calls / CompletionHandler / URLSessions

I have this long function here which makes a bunch of API calls, parses through data and returns two arrays representing a bunch of sight-seeing locations (one array holds the latitudes, one holds the ...

Migrate constraint to another size class - Xcode

I have an iPhone app that already use auto layout, is there a way to migrate those constraints to any-any size and make it work for iPad? thanks in advance.

how can I change the button of a detailDisclosureButton of a UITableViewCell

I am trying to change the default button of a detailDisclosureButton of a UITableViewCell. I am able to change the button by doing the following: button.frame = CGRect(x: 0, y: 0, width: 10, height: ...

retrieving values from a .strings file. Swift 3 Xcode 8

Hi i am new to swift and i am trying to retrieve values from a .strings file, which is saved within my application. I am using the key=value approach.. i am wanting to save the value of the key as an ...

electron-installer-dmg installation error

When I run: sudo npm i electron-installer-dmg -g I get this error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a ...

NSTableView get indexPath having the cell

With UITableView it's pretty easy to find the indexPath based on a cell using tableView.indexPath(for: cell) but on MacOS this method does not exist unfortunately. My use case is the following: I ...

Source code of .saver file [duplicate]

I was wondering if there is a way to decompile a .saver file so I can edit it instead of making my own. I only want to change the apple icon that floats with it so I don't think it is worth making a ...

CoreData DBManager Errors for retrieve and entering record code

I am new to IOS trying to implement a database manager class to hand the retrieving of rows and saving. Getting the error "Use of Unresolved identifier for NSEntityDescription, NSManagedObject, ...

Cannot assign value of type 'Array<SKtexture>' to type 'SKTexture'

I define a array of SKTextures in a class like this : var walking: Array<SKTexture> = [] Then I have a function in the same class that returns a element of that array : func running() -> ...

Linker setting for distributed dylib

I'm struggling with the right options in XCode to include a dylib in my app. I do have a dylib in /usr/local/lib which I do need for my app. As long as I set this path in Lib Search Paths everything ...

Can't get NSMutableDictionary to work (xcode)

My Objective-C experience is not good, I would love if someone can help with this. There are some other code around but I believe I simplified this to just the problem. What I am trying to do is to ...

Returning hundreds of errors when including SwiftyJSON

ErrorI am learning swift at the moment and recently tried to use SwiftyJSON to parse JSON data. However, following a tutorial, when I dragged the SwiftyJSON.swift file into my project window, it ...

Xcode main.storyboard Changed to XML File

I am in the process of making an app and I found that my main.storyboard file had changed to "navigation" as an XML file and I can't seem to turn it back into a storyboard format. I am not sure how ...

How do make a UIScrollview only show one subview at a time

I followed a tutorial: https://www.youtube.com/watch?v=1_daE3IL_1s that teaches you how to make a snap-chat like menu in swift 3, where every time you swipe a new subview is put on the screen, but it ...

Present a ViewController from the Appdelegate Swift

I have a 3D Force Touch Action that I set up in my Info.plist. Now I want that when the 3D Action is running it presents a view controller that I gave a Storyboard ID and I need to do this in the ...

Edit a default screensaver?

I have been desperately attempting to edit the floating words screensaver. I would like to change the apple to a different image but I cannot understand the code in package contents or find and ...

How to store data into a many-to-many relationship in CoreData?

So i'm developing a workout tracker application and i have one entity which has all the exercises and another which will have saved workouts. I have setup a many-to-many relationship between the two ...

How do I append Altitude Integers

I need to display the current Altitude in a current app I am building. However, when the Altitude is determined, the label gets displayed with xxx.xxxxxxxxxxxx It goes super far on the other side of ...

Swift - Guard-let vs if-let [on hold]

I am having some issues getting the following code to work, any ideas why it doesn't work? guard let parsedData = try? JSONSerialization.jsonObject(with: data!, options: .allowFragments), let ...

How can I integrate quickblox framework with objective c headers files, in my swift project?

I am integrating quickblox framework for chat feature into my own app in Xcode 8.2 using swift 3.0, but while importing header files of quickblox framework in bridging header file, its giving errors ...

CSV parse and Date SWIFT

Iam new in Swift and i have problems in my code I want to make prayer App without install library My app have 365 days "number of days in year" I was wrote the time to My app in CSV file and Parse ...

Submitting a new version of my App in the app store [on hold]

I have an app that I developed a little over 3 years ago built with Obj C and not using ay type of database . Over the past 6 months I redesigned (UX / UI) the app and built it from the ground up. I ...

Touches on the far left side not registering due to 3D Touch App Switching

Since iPhone6s, when Apple introduced 3D Touch, they added a new way to switch apps : press down on the side of the screen, and swipe. An annoying side effect is that this has introduced a small "...

Adaptive storyboard (fit lots of buttons onto all devices correctly)

I have been trying to figure out how to get my app to look good on all apple devices. I will say I made this app very quickly and was not thinking about how it would look on different devices when I ...

How to set values of create custom progress bar

In this image i have two buttons by using two buttons we have to increse tor decrese the black area for increase or decrease i have using two equal height width views & i have increase or decrease ...

How to perform an action only when three buttons are selected at a time in swift?

I'm making a card game and I want an action to be performed whenever three buttons out of twelve are selected. How can I define this in Xcode-Swift?
Translating... 0%