Post

Replies

Boosts

Views

Activity

Reply to ScrollView shrink to fit
I probably miss something. Why do you need to shrink the ScrollView ? If the content is smaller than scrollView, there will be no scroll. Do you just want to hide scroll indicators ? Or hide the frame of the scrollView ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21
Reply to Editing Button
I can't make the button a weak var What do you mean ? You cannot control-drag the button from Storyboard in the code to create the IBOutlet ? If so, you have to check that the ViewController in the storyboard has the same class as the class into which you try to create the IBOutlet. So check in Interface Builder (storyboard): select the viewController in which is the button open the Identity Inspector in the right panel check the class of the ViewController is it the same class as the one in code where you try to create the IBOutlet ? If no, change the class in Identy inspector. Another possible reason is that you control-drag the button from IB to the wrong place in the file. It must be inside the class. Another way to try is to write in code: 		@IBOutlet weak var theButton			 : UIButton!		 Then open the storyboard in a second pane, next to the code (swift file) drag from the white dot on the left of the IBOutlet declaration top the corresponding button in IB. If that works, don't forget to close the thread by marking the answer as correct. If not, please explain better your problem.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’21
Reply to How to Sum User-Generated Data
So, pointsReceived is inside a struct. You probably have declare a var as: var grade : Grade And you have initialised with some value You need to call:  let total = grade.pointsReceived.reduce(0, +) If that works, don't forget to close the thread by marking correct answer. If not, please explain and show more code.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’21
Reply to Xcode Swift ビルドができない
I bought a Mac M1. I'm developing an app using Firebase, but I can't build it with the simulator. I found out that I had a similar problem with the M1 chip, but can anyone solve it? Error statement ld: in/--Filepath--/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_a8eeba373b74508311b8b22b8d3202a6.o), building for iOS Simulator, but linking in object file built for iOS, file '/--Filepath--/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture arm64 Firebaseに直接問い合わせる必要があります。たぶん彼らのポッドを更新する必要があります。 彼らのフォーラムにアクセスして、そこに解決策があるかどうかを確認してください。 You should ask to Firebase directly. Maybe their pod has to be updated. Go to their forum to see if there are solutions there.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’21