swift tag

599 questions


1 answers
26 views
0
About the function called nil in swift

The description of the part of this image says that if you add ! when a variable is substituted with nil, it crashes when the instruction is executed.(https://i.stack.imgur.com/PwDZ8.jpg)!However, in ...

2 years ago

1 answers
56 views
0
Want Swift5 and Objective-C to work together

After creating a bridge header, I was able to confirm that the ObjectiveC method works from swift.TestProvider.swiftimport NetworkExtension// @objc (TestProvider)class TestProvider:NEAPPushProvider { ...

2 years ago

1 answers
32 views
0
The contents of the array become nil.

That's how we put them together.However, when I run, image1~image6 appears as nil (there is an image called sample in the project).I would appreciate it if you could tell me the cause.let image1 = UII...

2 years ago

1 answers
44 views
0
How to prevent Ambiguos Layout from appearing in vertical and horizontal UIView layouts in Swift

As I am doing the Swift program, I am also concerned about warning, so please let me ask you a question without thinking.I have laid out the UIView on the storyboard and placed it using Constraints.I ...

2 years ago

1 answers
28 views
0
The image is reversed up and down by Swift's PDFKit.

I am trying to create a PDF using PDFKit in swift4.0.The PDF itself was easy to create, but when I opened the contents, it turned upside down.Some specification may be insufficient/extra.Please let me...

2 years ago

2 answers
77 views
0
I would like to improve the inability to retrieve data correctly because the processing is shifted to the background by HTTP communication.Or alternatives?

Due to background processing, the order of operation of the functions below has changed and the return value of the functions is not expected.let task=NSURLSession.sharedSession().dataTaskWithRequest....

2 years ago

1 answers
90 views
0
Meaning of sharing (replay:1) in BehaviorRelay

You may see share(replay:1) using BehaviorRelay on RxSwift.let relay=RxCocoa.BehaviorRelay<String>(value:)variable:RxSwift.Observable<String>{ return relay .observeOn(MainScheduler.instan...

2 years ago

1 answers
57 views
0
Understanding Perth of JSON Data from API

I got the book information using Google API.{totalItems:int, items:[{kind:books#volume, volumeInfo: {title: hoge, authors: [name, publishedDate: 2014-06-20}]}I don't know how to extract the c...

2 years ago

3 answers
73 views
0
About the language specifications of the swift cast

Please tell me the difference between as Int and Int().If you use as Hoge when you cast with swift, it will be cast.Also, Int() is recognized as a function that casts into Int.I looked at Apple's offi...

2 years ago

1 answers
55 views
0
Swift Initialization Process Fails

An error occurs when you try to substitute the structure properties with the value received by the init argument.In selected=state on the second line of initself'used before all stored properties are ...

2 years ago
« - 54 - »

© 2024 OneMinuteCode. All rights reserved.