swift tag

599 questions


1 answers
38 views
0
Error Type 'String? 'has no member' default'

let action=UIAlertController(title: OK, message: .default) {(_)inWhen I write, I get the error Type 'String?' has no member 'default' Why do I get this error?How can I fix the error?

2 years ago

1 answers
79 views
0
Change the Weight of the Font in Swift

In Swift 2.0, how do I change the weight of the font with the code?It's easy to change on the Storyboard, but for various reasons I had to do it with the code.There is no problem functionally without ...

2 years ago

1 answers
111 views
0
UI parts associated with StoryBoard

The UI part (IBOutlet) linked from the StoryBoard will be of the ImplicitlyUnwrappedOptionsal type, but will it not become nil after the linked class is instantiated?Migrating from Objective-C to Swif...

2 years ago

1 answers
81 views
0
I want to use AVCaptureConnection to set the orientation of the device when shooting a video (Swift)

I use iOS Swift to create a video save process.I can now save videos, but when I check the video taken with the iPhone facing up with the camera roll, it is facing sideways.To avoid this, we found tha...


2 answers
48 views
0
The operation couldn't be completed. (LaunchServicesError 0.) when compiling with Xcode

The operation couldn't be completed. (LaunchServicesError 0.) When I try to run the simulator, it comes out.I tried rebooting the Mac, resetting and rebooting the simulator, rebooting the Xcode, and c...

2 years ago

1 answers
29 views
0
Swift playground Challenge "Symmetric Stars" Answers

I am re-learning from Swift playground.I'm stuck with the title Let's Learn Code 3I found out the answer online, but I didn't know why it was correct.In particular, I do not understand the last for lo...

2 years ago

2 answers
81 views
0
I don't know how to reflect the updated data received by Swift via Bluetooth in a different view.

·Language: Swift·Bluetooth device used: Texas Instruments CC2541 SensorTagSorry for the beginner's question.This is my first time to ask you a question, so I would appreciate it if you could let me kn...

2 years ago

1 answers
43 views
0
Error configuring path

When setting up the path, the error similar to the comment in the code below appears.I don't know the cause, so if anyone knows, please let me know.import UIKitclassViewController:UIViewController { l...

2 years ago

3 answers
34 views
0
Swift Method Conventions in Natural Language Sentences

When describing a method name in a natural language sentence, I think I wrote it like + [Foo bar] or - [Foo baz:qux:] in Objective-C, but how do you usually write it in Swift?

2 years ago

3 answers
47 views
0
How to make the center of a map your current location only once

import UIKitimport CoreLocationimport MapKitclassViewController:UIViewController, CLLocationManagerDelegate, MKMapViewDelegate{ @IBOutlet weak var theMap:MKMapView! // @IBOutlet weak var theLabel:UILa...

2 years ago
« - 43 - »

© 2024 OneMinuteCode. All rights reserved.