How Programatically Change Spaces Sequence? - swift

In the Picture above Mission Control is Launched, and we can see the Space Sequence:
[Mesa 1, Safari, Xcode, Discord, Mesa 2]
How can is possible change this sequence using Swift or Objective-C?

Depends on whether you want to use private API. There are a few github projects that support that functionality.
https://github.com/JulianEberius/qsx/blob/master/src/objc/CGSPrivate.h#L197-L198
https://github.com/lwouis/alt-tab-macos/issues/14
https://github.com/koekeishiya/yabai
This one even says it can do it without private API:
https://github.com/bigbearlabs/SpaceSwitcher
EDIT: as for the last one, I initially misunderstood your question that you want to switch to a different space which is not the actual question (my bad, this is how I found the question). Anyway, the aspect of the answer about using private API still holds. Though you probably will have to dig deep to find how...

For there to be a way to do that, Mission Control would have to have a publicly exposed API. I don't believe that it does and there is no way to accomplish what you are trying to do. You could send a feedback request to Apple and ask them to add that functionality.

Related

What's the simplest way to login to a website in swift 4

I have found other answers to this question on this site, but they seem to be either outdated or not especially descriptive. I am rather unexperienced in website access using swift so code would be greatly appreciated.
If I already have the username and password, how do I log into a website, for example this one, using swift code.
This other SA question seems to solve the problem well: How to log into web site using uiwebview with swift?
The way I am trying to solve this issue is by creating a new View Controller and adding a Web View on to it with access to the website. There's a post here Get HTML from WKWebview in Swift that could help as you are using Swift, but without any detailing of your code this issue can't be solved completely. My solution is a bit unorthodox and frankly "bad coding", but it should in theory function well and I have seen other responses which do it similarly. Also, I would revise your question and try to make it more formal/informative so everyone could have a better chance at helping you out.
Good Luck!
Edit: Reviewing a different response
The easiest way to do this as mentioned by one of your comments would be to see if the Website you are using has an API. I used a course on Udemy which explained their functionalities if you need one. I would recommend looking at the Cocoa Pod Alamofire and seeing if it could help you (perhaps in conjunction with SwiftyJSON).
Side note:
The reason why I am not using Alamofire for my project (one similar to yours) is because I could not find an accessible API.

Setting up ReactiveUI.Mobile

In the following documentation, https://github.com/reactiveui/ReactiveUI/blob/docs/docs/basics/routing.md
It states that by setting up ReactiveUI.Mobile, you will be able to achieve correct handling of the back button for free. I've tried to look around for documentation but can't seem to find any.
Could someone point me to a suitable link / sample that I can refer to?
It states that by setting up ReactiveUI.Mobile, you will be able to achieve correct handling of the back button for free. I've tried to look around for documentation but can't seem to find any.
Setting up RxUI.Mobile is super platform-dependent, and you only get a free back button on WP8 Silverlight apps. I'd stick with just using routing (or avoiding routing altogether) for now. RxUI.Mobile will probably change quite a bit in 6.0 (it's my least favorite part of the framework at the moment).

Name of special alert view iphone

I have been looking for the name of this UI element for a while now, but I cant come up with anything. What is the name of the round rect with 'Reloading Data' in it? I thought that I remembered using a view like this a while back, and there was some open source library that made its use much easier.
Screen shot of cydia.
The Apple API is private and cannot be used in AppStore apps. I and many others use MBProgressHUD: http://cocoadev.com/wiki/MBProgressHUD.
It's MBProgressHUD.
You will get more opensource controls on this link.
Why don't you just use a UIActivityIndicator? It essentially provides the same utility without the need to implement 3rd party code? Do you really need any custom behavior the class does not already provide? The simpler the better you know..? ;)

Is it possible to programmatically create a symbolic link on an iPhone?

I need to create a symbolic link on iPhone devices programatically in order to avoid a lot of slow file copying. Is this possible to do and if so, how?
It's technically possible, via the NSFileManager class. Grab the singleton instance and then use any of the calls listed under 'Linking an Item' or 'Symbolic-Link Operations' (createSymbolicLinkAtPath:withDestinationPath:error: looks like a good candidate).
Using a link rather than a direct file was a method briefly used by developers to update their Default.png programmatically, but that specific use has been outlawed by Apple. Besides that I'm afraid I have to plead ignorance on any SDK usage restrictions.

iPhone SDK: Ideas on how to implement a help facility for application

We we wondering what are some ways developers have added a help function to their apps. What are some techniques people have used?
One way we were thinking of is to us UIWebView to display a HTML file with help instructions.
Thoughts appreciated.
I'm using UIWebView right now which pretty much contains all the help in a single page, along with some JQuery things to display popups, etc. But I like the way iCab Mobile (et al.) are doing things which is a sectioned UITableView with each row a separate topic or section within their overall help information (complete with icons...) then in their bundle they have each section in its own html file, organized by localization.
Another thing in my queue for the next release is to provide a dynamic "News" view. The rough idea is as follows... I have on my server a file or CGI where I can place small bits of news I'd like to push out to users. On startup, my app checks for network availability and if present, start a thread to see if anything has changed on the server since last updating the News data. If changes present, post an alert letting user know, and asking if they'd like to read it now. At that point, the latest news is already downloaded and cached, so they can simply read it later if they want, and I won't post anymore alerts until the server file changes again. (And one could add a preference/setting to disable these alerts.)
I'm thinking this would be a good way to let people know that some nasty bug is known and fixed and an update is sitting in the queue, solicit beta testers, promote upcoming features or other apps, etc. I can see where constant alerts everytime I've got something new to promote would get annoying, so having a setting to disable them means the user never has to read them unless they want to. Although some kind of override to warn of recently discovered/fixed bugs seems sensible.
FWIW, the author of Mover+/Mover has just started doing a similar thing, though I think Emanuele is perhaps only showing one Notelet at a time, whereas I envision a bit more of a history (shown in UIWebView) until I decide to age stuff off the bottom of the stack.
I'm using a scroll/page view to show several images containing small notes. Each image then tells the user about the more advanced functions on a specific part of the app.
In my opinion the help should only contain information that isn't a 100% relevant for the use of the application. It should be things the advanced user should use to make more use of the app. It should contain gold for the power users. The "basics" should be so obvious that no help would ever be needed. If that's not the case, I think, you've failed as a developer on the iPhone platform.
(Here's a screen shot from my demo app)
I'm currently creating a fairly complicated app. I'm thinking of doing help as a semi-transparent overlay - help in text form is hard to swallow for users; it's much more helpful to just point at stuff and say "this does that".