Post

Replies

Boosts

Views

Activity

Reply to Splash Screen Stuck on IOS 14.4+
(Android is fine) That's not a guarantee for anything ! Have you an image on the splashScreen ? How large is it ? If several Mbytes, try reduce its size below 1 MB, or even remove, just to see. Do you access any data for the splash screen from the cloud ? If so, try to save these data locally (image specifically).
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Storyboard Issue (Urgent)
First, to avoid additional issues: save a copy of the complete project (the whole folder) Now to your problem. Hard to tell with so little information. It would be useful to tell what you have done. You had an old version. How old was it (the one you see now) Do you still have this complete project saved ? When did you do some change ? To the storyboard. What did you change ? Are they important changes ? Do you remember some specific object in the new version ? If so, you could search with Spotlight if you can find it. You could also search for Main.storyboard and see if you can locate something useful. Did you relaunch Xcode and open the project ? You could also open the storyboard in XML format to see if you find some corrupted data. At the end, if nothing work: save a copy of the complete project (the whole folder) try to recreate the storyboard changes.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Do not repeat question, removeAtIndex
Or you can remove the question from gameModels. Another way would be to add a property to Question struct: struct Question {     // What you had so far     var answered = false } Then you could show the answered questions as dimmed text. When selecting a question, toggle answered to true. And add a test to check if question is answered. Please, don't forget to close the thread once done.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to How can I draw something outside the NSSlider in NSSliderCell?
I did this, with a slider named sliderWithTicks.cell sliderWithTicks.cell?.controlView?.wantsLayer = true sliderWithTicks.cell?.controlView?.layer?.masksToBounds = false sliderWithTicks.cell?.controlView?.layer?.backgroundColor = CGColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 0.5) let text = NSTextField(string: " 1 2 3 4") text.frame = NSRect(x: 0, y: -16, width: 100, height: 24) text.drawsBackground = false text.isBezeled = false text.isEditable = false sliderWithTicks.cell?.controlView?.addSubview(text)
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’21
Reply to setAlternateIconName with nothing changed
I assume you speak of completion handler. Could you show the code for: setAlternateIconName(…) call the alert Did you test for errorCode ? the alert show me that it changes the icon successfully Which alert are you speaking about ? Doc says there is no need to dispatch to main queue: completionHandler A handler to be executed with the results. After attempting to change your app's icon, the system reports the results by calling your handler. (The handler is executed on a UIKit-provided queue, and not necessarily on your app's main queue.) The handler has no return value and takes the following parameter: Check also the notice: Discussion Use this method to change your app's icon to its primary icon or to one of its alternate icons. You can change the icon only if the value of the supportsAlternateIcons property is true. You must declare your app's primary and alternate icons using the CFBundleIcons key of your app's Info.plist file. For information about how to configure alternate icons for your app, see the description of the CFBundleIcons key in Information Property List Key Reference.
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’21
Reply to Populate one column based on values of other column in a NSTableView
Here is how I would do: You have a dataSource for the table, which is a 2 dimensional array. Right ? array[column][row] Then the second column array[1] should be computed based on the values of first column array[0] So, when you change an item in column 0, recompute column 1 and ask for reloading with func reloadData(forRowIndexes rowIndexes: IndexSet, columnIndexes: IndexSet)
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’21
Reply to My app stops in Simulator
The code is good and does not show any error.  No, the code may compile and build an app but not be good. But, without getting more precise information, and without seeing code, very hard to say. Is it a SwiftUI or a UIKit app ? At least, post the Swift AppDelegate file and the Swift SceneDelegate file. Could you post the project somewhere or provide an email address to allow to share files ? the app stops working or displays a black screen. When the app starts before stopping, what do you get ? Have you a launch screen, do you see it before app turning black ?
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to How to create two distinct types of users in an application who interact with one another?
If you want to create 2 types of users with different rights or roles, you'll probably have to register them on your server (a self declaration isn't robust enough). Then, once user gets its credential, he/she will have access to some functions. Then interaction could go through your server. Take care to read carefully the Appstore guidelines, to check what you're authorised to do. If there is some commercial transaction, that needs to go through the Appstore.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’21
Reply to setAlternateIconName with nothing changed
Your code was not completely formatted. In which func is this part of code called ? if ([[UIApplication sharedApplication] supportsAlternateIcons]) { NSString *name = [UIApplication sharedApplication].alternateIconName; if (name&&[name isEqualToString:@"changeicon"]) { [[UIApplication sharedApplication] setAlternateIconName:nil completionHandler:^(NSError * _Nullable error) { }]; } else { [[UIApplication sharedApplication] setAlternateIconName:@"changeicon" completionHandler:^(NSError * _Nullable error) { }]; } } } Could you log the error lines 5 and 9 ? and add a NSLog to check which branch of the if / else is used. Line 4, if name isEqualToString:@"changeicon" (which should always be true), then you return to app's primary icon. Is it intentional ? AFAIU, you should systematically execute line 4 and never 8.
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’21
Reply to Developing on iPad
Did you try with UIImage(named: "image.jpg"), after copying the image in Resources ? Look here: https://stackoverflow.com/questions/24069479/swift-playgrounds-with-uiimage or here: https://developer.apple.com/forums/thread/667024
Mar ’21