Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged Swift

0 votes
500 views
1 answer
    My app has a protocol for detail view controllers, stating they must have a viewModel property: protocol ... might go about it. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
728 views
1 answer
    How to use AttributedString in SwiftUI. There is no API available to use AttributedString in Text See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
646 views
1 answer
    My navigation controller intermittently will freeze on push. It seems to add the new view controller onto the ... same position as before. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
566 views
1 answer
    I usually use custom UIColors on iOS using extensions with Swift, but now with iOS 11/ Xcode 9 we can create ... UIColor(named: "color-name") See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.7k views
1 answer
    I have the following class: class ReportView: NSView { var categoriesPerPage = [[Int]]() var numPages: Int ... ReportView' What does this mean? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
620 views
1 answer
    I want to unwrap two optionals in one if statement, but the compiler complaints about an expected expression after ... smthg } Done in Swift. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
828 views
1 answer
    I have a root view controller which isn't set as the custom class for any of my view controllers on my ... the message is not being printed. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
806 views
1 answer
    I'm using the Realtime Database with Google's Firebase, and I'm trying to check if a child exists. My ... Comment if any clarification is needed See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
922 views
1 answer
    How do you unwrap a string that is returned as: (Optional(Optional "blue")) var cityName = String() if let ... out as (Optional "New York") See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
822 views
1 answer
    Since SwiftUI is declarative there is no dismiss method. How can is add a dismiss/close button to the DetailView? ... : DetailView()) } } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
578 views
1 answer
    I am learning SwiftUI. And I come across to "GeometryReader". And I want to know why and when to use it? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
835 views
1 answer
    I have my UISearchBar being part of the navigation bar like: let searchBar = UISearchBar() //some more ... across all view controllers ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
384 views
1 answer
    No matter if modals are presented or the user performs any type of segue. Is there a way to keep the button " ... as an example of such button. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
666 views
1 answer
    I am trying to read the value of a Firestore document. I have tried doing it two different ways, but ... ) } } return firestoreUserDocument } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
809 views
1 answer
    I have a classe named "whisky builder" which only initiates the new Whisky. Now i would like to add the new ... Thanks in advance for your help See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
660 views
1 answer
    In Swift, I'm trying to do the following: struct Foo { var bar = 1 func baz() { bar = 2 } } Xcode ... struct to a class, there's no error. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
910 views
1 answer
    I am trying to read the width of my Text depending on size of Text Font, As we know GeometryReader takes all ... .gray) .cornerRadius(20) } } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
516 views
1 answer
    I am working with on a Cocoa project in Swift and confronted the following problem: Several classes in the Cocoa ... println: is not available. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
346 views
1 answer
    I feel that I've always misunderstood that when reference cycles are created. Before I use to think ... DispatchWorkItem {...}───└────────┘ See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I need to multiply an array by another array element-wise, just like the Hadamard product of vectors in math. ... solution for me, any ideas? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
578 views
1 answer
    Super newb in Swift and iOS development here. I am following this tutorial about implementing a custom control in ... just crashes it later. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
862 views
1 answer
    I have a Realm Object which has several relationships, anyone has a good code snippet that generalizes a copy ... a duplicate in the database. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
533 views
1 answer
    Can someone give me a good reason for why this doesn't work: let a: [Int]? = [1] let b: [Int]? = nil ... _ = rhs { return false } return true } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
533 views
1 answer
    This idiom of Swift makes good sense if let x = someDict[someKey] { ... } However, what I really want ... incorrect, but is this idea possible? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I want to display data fetched from Core Data in a widget. But @FetchRequest doesn't work on widgets. As I ... from Core Data in widgets. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
825 views
1 answer
    Hello Im trying to segue from a modal to a tab bar view controller without losing the tab bar? I know the ... Controller A. Swift please :D See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
591 views
1 answer
    I am using SwiftUI and bridge to UITextField (I need to assign firstResponder). I use the code from here: ... the textField in the frame? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
582 views
1 answer
    Hello I have pored over the documentation and can not figure out how to set up collision detection in scene kit. ... not sure how to do that. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...