Post

Replies

Boosts

Views

Activity

Reply to Where and How to Create FileManager as a Singleton?
Assuming you are using MVVM with SwiftUI, your ViewModel can still refer to FileManager.default. Or SwiftUI itself can refer to FileManager.default... or you can assign it to a local var in a SwiftUIView, like... @State private var manager = FileManager.default FileManager.default is the same thing, wherever you refer to it... (that's the point of a Singleton), so you don't need to pass it in to your View. You are not really creating the Singleton, you are just referring to it. Is that what you are asking?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’22
Reply to How to call a view in SwiftUI?
When using EmployeeDetails(), you need to pass it an Employee. e.g. struct EmployeeDetails_Previews: PreviewProvider { static var previews: some View { let employee = Employee() /// However you create an Employee... return EmployeeDetails(employee: employee) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’22
Reply to Developer Documentation within Xcode is too small
Xcode can set text sizes quite flexibly... Xcode > Preferences > Themes Source Editor Console ...but as you have seen, this seems to have no effect on the Developer Documentation But there's also: Xcode > Preferences > General Navigator Size: {System, Small, Medium, Large} ...which changes the size of text in the Navigator (the "side bar", both in Xcode itself, and the Developer Documentation) ...so this is one of the things you wanted. A small win?
Feb ’22
Reply to Insert Image into RoundedRectangle()
There are a number of ways you could do this... I would drop the RoundedRectangle, and use the Image as the navigation link Give it some padding Set the background color Set the corner radius NavigationLink(destination: EmptyView()) { Image(systemName: "heart.fill") .padding(100) .background(Color.red) .cornerRadius(25) } Alternatively, if you want to keep the RoundedRectangle (for some other reason) use a ZStack, like this: NavigationLink(destination: EmptyView()) { ZStack { RoundedRectangle(cornerRadius: 25) .fill(Color.red) Image(systemName: "heart.fill") } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’22
Reply to iOS app Family Sharing flag
So our users think they can share our subscription in their family. but I'm talking about Family sharing for the app itself, not for in-app subscriptions It's a free app, so anyone can download it, for free. "Family Sharing" is for sharing the subscription. Apple say: You can now enable Family Sharing for auto-renewable subscriptions and non-consumable in-app purchases, allowing users to share their purchases with up to five family members
Feb ’22
Reply to Where and How to Create FileManager as a Singleton?
Assuming you are using MVVM with SwiftUI, your ViewModel can still refer to FileManager.default. Or SwiftUI itself can refer to FileManager.default... or you can assign it to a local var in a SwiftUIView, like... @State private var manager = FileManager.default FileManager.default is the same thing, wherever you refer to it... (that's the point of a Singleton), so you don't need to pass it in to your View. You are not really creating the Singleton, you are just referring to it. Is that what you are asking?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to How to call a view in SwiftUI?
When using EmployeeDetails(), you need to pass it an Employee. e.g. struct EmployeeDetails_Previews: PreviewProvider { static var previews: some View { let employee = Employee() /// However you create an Employee... return EmployeeDetails(employee: employee) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Developer Documentation within Xcode is too small
Xcode can set text sizes quite flexibly... Xcode > Preferences > Themes Source Editor Console ...but as you have seen, this seems to have no effect on the Developer Documentation But there's also: Xcode > Preferences > General Navigator Size: {System, Small, Medium, Large} ...which changes the size of text in the Navigator (the "side bar", both in Xcode itself, and the Developer Documentation) ...so this is one of the things you wanted. A small win?
Replies
Boosts
Views
Activity
Feb ’22
Reply to Insert Image into RoundedRectangle()
There are a number of ways you could do this... I would drop the RoundedRectangle, and use the Image as the navigation link Give it some padding Set the background color Set the corner radius NavigationLink(destination: EmptyView()) { Image(systemName: "heart.fill") .padding(100) .background(Color.red) .cornerRadius(25) } Alternatively, if you want to keep the RoundedRectangle (for some other reason) use a ZStack, like this: NavigationLink(destination: EmptyView()) { ZStack { RoundedRectangle(cornerRadius: 25) .fill(Color.red) Image(systemName: "heart.fill") } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Custom Apps in Europe for international employees
There is a new option called "Unlisted app distribution", which might suit your case. The app is not listed on the App Store, and is made available by distributing a direct link. See: https://developer.apple.com/support/unlisted-app-distribution/
Replies
Boosts
Views
Activity
Feb ’22
Reply to Mapping Real Life Object
Have you made any progress on this, @tuskuno
Topic: Graphics & Games SubTopic: RealityKit Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to CoreLocation data across multiple apps
Do you feel that this question has been answered, @Anish.Munirathinam?
Replies
Boosts
Views
Activity
Feb ’22
Reply to How to increase or decrease the probability of an item being picked from an array?
Was that helpful, @TanavSharma?
Replies
Boosts
Views
Activity
Feb ’22
Reply to iOS app Family Sharing flag
Apple say: Please note that once you turn on Family Sharing for an in-app purchases in App Store Connect, you cannot turn it off. See https://help.apple.com/app-store-connect/#/dev45b03fab9 ...so you may need to create a new subscription, with Family Sharing turned off.
Replies
Boosts
Views
Activity
Feb ’22
Reply to iOS app Family Sharing flag
So our users think they can share our subscription in their family. but I'm talking about Family sharing for the app itself, not for in-app subscriptions It's a free app, so anyone can download it, for free. "Family Sharing" is for sharing the subscription. Apple say: You can now enable Family Sharing for auto-renewable subscriptions and non-consumable in-app purchases, allowing users to share their purchases with up to five family members
Replies
Boosts
Views
Activity
Feb ’22
Reply to iOS app Family Sharing flag
Okay... I'm quoting Apple, and providing a link, but you say I'm wrong. That's fine. Good luck.
Replies
Boosts
Views
Activity
Feb ’22
Reply to WKWebVIew Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
Try this: guard let url = URL(string: "https://www.google.com") else {return} Otherwise, "myWebView" must be nil. You could add a diagnostic message, before the error line... print("myWebView: \(myWebView)")
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to how to hide uitext invisible
What do you mean by "UItext"?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to how to use a progress bar
any help? Yep. https://developer.apple.com/documentation/appkit/nsprogressindicator
Replies
Boosts
Views
Activity
Feb ’22
Reply to Bring Quartz Composer back
How much would you be willing to pay for it?
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’22