Posts

Post marked as solved
6 Replies
3.3k Views
I would like to include the bottom sheet from the iPhone "find my" and "maps" app in my app. During my research I came across the new modifier .presentationDetents for sheets. The only problem here is that you can no longer interact with the main screen when the sheet is active. In my app, however, I would like the sheet to be active all the time like in the iPhone apps mentioned and that you can still interact with the main screen like in the iPhone apps with the map. I would be very happy about help. Greetings
Posted Last updated
.
Post marked as solved
5 Replies
3.8k Views
Hey, I want my preview to only have the size of the view and not show the whole iPhone. I have already tried it with this code: struct TimerCardView: View { var body: some View { Text("Hello, World!") .padding() .background(.gray) } } struct TimerCardView_Previews: PreviewProvider { static var previews: some View { TimerCardView() .previewLayout(.sizeThatFits) } } but nothing happened. What am I doing wrong? I appreciate help
Posted Last updated
.
Post not yet marked as solved
0 Replies
544 Views
Hey. I would like to offer non-consumable in-app purchases in my IOS app and was wondering if I have to offer a money-back guarantee for non-consumable in-app purchases? So if someone buys my app, can they return it? Or is that generally not possible with non-consumable in-app purchases? If there is no money-back guarantee, do I have to point this out to the users? In addition, I was wondering if there are bugs in my app that I didn't know about, do I have to give all my buyers their money back? Because I then sold a defective product... I would be happy to get a answer.
Posted Last updated
.
Post not yet marked as solved
0 Replies
1.1k Views
Hey. I just saw a youtube video about what's new in SF Symbols 4 which was released 3 months ago. There were 722 new symbols in the video as you can see here: In my SF Symbols 4, which I just downloaded, there are 890 new symbols: So it seems as if there was a new version of Sf Symbols 4 in the time from the Youtube video until now and therefore I wonder how often a new version appears because so far I have not been able to see any release history of the versions. Best wishes
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.3k Views
Hey. I have a form with 2 buttons. Now I would like to have a little space between these two buttons. Exactly like in this example: Does anyone know how to implement this? I appreciate help!
Posted Last updated
.
Post not yet marked as solved
0 Replies
915 Views
When integrating the new ShareLink into my project, I noticed two unexpected things. First, when I pass a SharePreview to my sharelink with just a title and no image as a pararameter, my AppIcon suddenly loads in the preview. Is that normal? Just with that code: ShareLink(item: appStoreUrl, message: Text(["", ""].randomElement()!), preview: SharePreview("ProTimer")) { Label { Text("ProTimer weiterempfehlen") .tint(.primary) } icon: { Image(systemName: "square.and.arrow.up") } } My second question is, why can't I pass a subtitle in the SharePreview, only the title in bold?
Posted Last updated
.
Post not yet marked as solved
3 Replies
994 Views
Hey. I´ve created an UIPickerView for selecting time durations in my App. Note: I used UIViewRepresentable to include this picker in my SwiftUI project, it shouldn't make any difference to the UIPickerView. Code: struct DurationPickerView: UIViewRepresentable { func makeUIView(context: Context) -> UIPickerView { let picker = UIPickerView() picker.dataSource = context.coordinator picker.delegate = context.coordinator picker.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) picker.setContentHuggingPriority(.defaultLow, for: .horizontal) return picker } func updateUIView(_ uiView: UIViewType, context: Context) {} func makeCoordinator() -> Coordinator { Coordinator(self) } class Coordinator: NSObject, UIPickerViewDelegate, UIPickerViewDataSource { let parent: DurationPickerView init(_ parent: DurationPickerView) { self.parent = parent } func numberOfComponents(in pickerView: UIPickerView) -> Int { return 6 } func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { if component == 0 { return 25 } else if component == 1 { return 1 } else if component == 2 { return 61 } else if component == 3 { return 1 } else if component == 4 { return 61 } else if component == 5 { return 1 } return 0 } func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { if component == 0 { return "\(row)" } else if component == 1 { return "Std." } else if component == 2 { return "\(row)" } else if component == 3 { return "Min." } else if component == 4 { return "\(row)" } else if component == 5 { return "Sek." } return "" } } } At the moment I'm using another pickerview row to describe the selectable rows. But thats not what I want... I want a row description that is not selectable and has a smaller text size for each selectable picker component like in the iPhone clock app: I appreciate any help!
Posted Last updated
.
Post not yet marked as solved
2 Replies
725 Views
Hey. I would like to enter this year's Swift student competition with my app. I'm 16 years old and I've been working on an app with XCode for 7 months. Accordingly, my app is now of course very large (500 mb) and of course also has the file extension .xcodeproj. So is my project already too big to take part in the competition? In addition, the requirements of the competition stated that the project should have the file extension .swiftpm... I would be very sad if my work at my young age could not be appreciated. Best wishes
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
I have a text in a frame that can become too long depending on the user input. If a text is too long in SwiftUI, SwiftUI abbreviates it with "..." at the end.Example: "That's a very long te..." But now I want the last x characters to always be displayed, even if the text is too long. A good example of my wish is XCode itself: I'd be happy for help.
Posted Last updated
.
Post not yet marked as solved
0 Replies
683 Views
Hey. I would like to include UIAlertController in my SwiftUI project because I have more customization options with UIAlertController than with swiftui alert. I've already partially done that with this code: struct CustomAlertManager { static let shared = CustomAlertManager() private init() {} func showAlert() { let alert = UIAlertController(title: "Achtung", message: "Sie werden weiter geleitet", preferredStyle: .alert) let okAction = UIAlertAction(title: "Ok", style: .default) { action in } alert.addAction(okAction) if let controller = UIApplication.shared.rootViewController { controller.present(alert, animated: true) } } } My UIApplication extension: extension UIApplication { var rootViewController: UIViewController? { let scene = self.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene return scene?.keyWindow?.rootViewController } } But now to my problem: This works pretty much fine but when I want to present an UIAlertController inside of a sheet the alert is not displayed (maybe its is unter the sheet). Note: No, the controller (UIApplication.shared.rootViewController) is not empty, so the .present(_:) method will be called 👍. Best regards!
Posted Last updated
.
Post not yet marked as solved
1 Replies
553 Views
Hey. I just discovered the "name" property under "app information" in my AppStore Connect app and also saw that I can set up different names for different translations. Now I'm wondering whether this property "name" of my app is the name of my app in the AppStore or just the "Display Name" that is on the home screen of the end device under the app? I'd be happy for help. Greetings
Posted Last updated
.