Search results for

show when run

112,741 results found

Post

Replies

Boosts

Views

Activity

UIAlertView shows nothing
I'm trying to recieve data from a server to initialize my app. However sometimes due to the network problem I cannot recieve any data. So at this time, I need to show an alert and exit the app. Here's my code:override func viewDidLoad() { super.viewDidLoad() / var params = Dictionary<String, String>(); params[path] = /; let response = ApiRequest.get(ApiRequest.LIST_FOLDER, params: params); if (response?.objectForKey(succ) == nil) { self.presentViewController(UIAlertController.init(title: Network Error, message: No recieved data, preferredStyle: UIAlertControllerStyle.Alert), animated: true, completion: nil); abort(); } if (response?.objectForKey(succ) as! String == 0) { UIAlertView(title: Server Error, message: Unable to process the request, delegate: nil, cancelButtonTitle: Cancel).show(); abort(); } folderList = FolderList(folders: response?.objectForKey(msg) as! NSDictionary); }But actually no alert view was shown when no network connection. Anybody knows why this happened?PS: if I
Topic: UI Frameworks SubTopic: AppKit Tags:
4
0
521
Oct ’15
Xcode shows wrong documentation
As the title says, Xcode is showing the wrong documentation.For example, I subclass a UIView (say MyPrivateView : UIView), and when I control+click on it, it shows the documentation of UITabBarController.Is there anyway to fixx this?(I tried documenting the class, but no use ... This is something that would be distributed in a framework, so we don't like any weird documentation)Thank you
0
0
284
Jan ’16
SwiftUI: Can't Show view
First Time: I detect beacons, Alert is displayed, to Show Artwork. But when I detect the beacons a second time, Alert not showing and the display of the screen is white I am new in swiftui, Please forgive me if I make a few mistakes My English isn’t so great. **Thanks! Any help would be deeply appreciated! **
2
0
802
Mar ’23
Reply to Change Split View to "normal" segue? iOS (phone) Swift 4.2 and 5
Well, it's getting interestinger and interestinger, as Alice would have said peering into her fogged-up mirror.I've just run Instruments (Xcode latest beta) for Leaks in two other, less complex, Swift projects - each with UITableViews and UICollectionsViews. Neither started out as SVC. Both showed no leaks running under iOS 12.1.4 on a physical device. Both showed leaks under 12.2 latest beta: the simpler app showed a few dozen leaks, the more complex several hundred. Almost all of the leaks are in Quartzcore or UIKitCore.Methinks there's a more general problem at play here, so my bug report stands.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’19
Reply to How to Fix Cracking and Popping Sound ?
Found this thread while trying to diagnose a crackling sound with my M1 Max macbook pro (Ventura 13.2.1), mostly using Bitwig Studio. Tried killall coreaudiod, but that didn't work. Same program works fine on my 2010 Mac Pro (running Monterey). Interestingly, the Bitwig DSP Performance Graph shows sharp spikes coinciding with each of the crackles. Activity monitor shows absolutely no memory pressure (the machine has 64GB, isn't running much). Tried changing sample rate in Bitwig, which did show a different baseline in the DSP Performance Graph, but the spikes still happen. Very odd behavior.
Topic: Community SubTopic: Apple Developers Tags:
Mar ’23
Programmatically show menu attached to a UIButton
I'm running into a bit of an issue with a menu attached to a UIButton in a Catalyst app. Clicking on the button works as expected: the menu appears (showsMenuAsPrimaryAction is set to true). However, because the button is in a form as a way for the user to select from a list of available options, I also need the ability to show the dropdown menu when I tab to the button from another field. I was hoping this would happen automatically if the button could become the first responder, but that does not appear to be the case. If there a way to make this happen?
0
0
1.4k
Feb ’21
How to activate app's running instance
Hope my scenario is not weird. Here is the description:1. User runs my app.2. User hides my app completely (all windows are hidden) so that he/she has no way to accessing the app. (Dont' ask why, user requested this feature and I want to implement it.)3. Now user rerun my app and I want to use XPC to tell the running instance to show itself.It sounds very reasonable and I have done most of code. But it is blocked by macOS the system. It seems macOS controls only one instnace of an app can be running at the same time; second try to run the same app (in /Applications) simply does nothing - the app code does not even get executed so that my code in main.m won't have the change to communicate with XPC.I believe there must be a way to overcome this. Any suggestions will be appreciated. Thanks and Merry Xmas!
8
0
1.2k
Dec ’16