iOS Swift - alert dialog with pages - ios

I want to provide my users an Info-Dialog, where they can click through several parts of information to show them the flow of the application.
How can I implement a UIAlertController that has several pages and where I can move to the next or previous via a button click?

You have to create custom UIViewController. But if you'd like to make it feel like an UIAlertControlleryou can use AlertOnboarding library as a pod.
And here you can find a bunch of walkthrough/onboarding/tutorial libraries for iOS.

Related

MvvmCross dialog on android, modal on ios

I have a screen with 1 button. When clicking that button, a list of items should be shown (in which the user can select multiple items).
On android, i would like to do this using a dialog. I create a "DialogService" that does this, no problem.
On iOS, however, it seems that the best practice is to display a fullscreen tableview, for example as a modalView. Is it possible to do this without using a custom viewpresenter (e.g. modalViewPresenter)? I would very much prefer to have identical navigation on both platforms and just have different implementations of "DialogService"
I think trying to make one platform look and act like another is generally not a great idea as things start to look weird for the users.
But if you want to do it anyway I would start by trying to do something like this https://stackoverflow.com/a/29910246/1107580 (it is in objective-c) then trying to bind to the tableview that is in the alertcontroller.

Tabbed iOS WebKit Browser with Swift

In short I am trying to build some typical browser functionalities in a Swift iOS app with WKWebViews (WebKit). I already have a functioning browser based on a WKWebView, which already has a menu bar with a URL input, navigation buttons, a share button, page title etc.
What I am struggling with is creating tabs for the browser. At first this seemed trivial as surely WKWebViews would support this in some way. Well, as far as I can tell they do not (looked at and tried multiple tutorials incl. hackingwithswift, Ray Wenderlich etc. + I checked Apple's documentation + stackoverflow)
This is what I have come up with so far:
1) Creating a new tab/opening a new URL should create a new UIView + WKWebView programmatically (I'll have to make a subclass out of my current browser view)
=> this should create a separate thread for each WKWebView/tab according to Apple's documentation
2) I need something like a Collection View (or Stack Views etc.) to store screenshot images of the already open tabs as a preview page of all tabs. The cells should be linked via a delegate to the corresponding WkWebView and they should have a close button to close (= delete) the tabs.
Am I overthinking this? If I go down this path I have to find a way to wire up (and subsequently delete) multiple delegates and views to the Collection View dynamically and I have to store & delete screenshots every time the user interacts with the tabs. It seems VERY messy. But given that Chrome on iOS is based on WebKit as of late, it's obviously doable.
How would you tackle this problem?
PS I didn't include a mockup because you all know how the tabs in Chrome, Safari etc. on iOS look like.
EDIT:
I am just looking for a clean and sensible way to add/remove and show the multiple WKWebViews, which are created by opening new tabs - just like in Chrome for iOS or Safari etc.
Ok, I have solved this today :) I will have a main UIView and then multiple WKWebViews, which can be "zoomed in" in order to enter full screen mode. No need for screenshots etc.

Is it possible to jump directly to one of the share extensions in UIActivityViewController?

Instead of using e.g. ShareKit or custom URL-scheme(to share to e.g. WhatsApp or Instagram), can you tap a button inside the app and skip the share extension dialog and go directly to one of the sharers there?
What I want to achieve is to have a button for each share type in our app, and tapping that button brings the user directly to the share screen for that type.
EDIT: We already have the share extension sharing working today, but we want to have a separate button for each sharer, like many apps have today. See attached example from musical.ly.
Yes it is possible but depends on what exactly you want? Did you want to send some file to printer? Or Email something? share via AirDrop?

MapKit: How to create a custom annotation view with a button on a .xib file?

I'm using Xcode 5 and the latest iOS SDK and I'm having a really hard time figuring out how to create custom annotations with a clickable button.
All I need is a custom annotation with a button, that is shown when the user taps a pin on my MKMapView. Following some tutorials, I managed to create a custom class that loads a .xib file, this already works. However, the problem is, that whenever I try to click a button placed on the annotation view, the pin gets deselected. I would love to be able to design my annotation in a .xib file and not create it 100% programmatically. Is there any way of doing so?
Thanks,
Niclas
There is a great tutorial on maps on a site I used when I first got started into this section of iOS. It can be found here: http://www.raywenderlich.com/21365/introduction-to-mapkit-in-ios-6-tutorial ( Just an FYI, this is a great resource for learning more about iOS. )
Anyways, this paragraph should sound familiar (as to what you're after):
You’ve now made it so that in the callout when a pin is tapped on, there will be a button on the right hand side. When this is tapped, the mapView:annotationView:calloutAccessoryControlTapped: method is called. In this method, you grab the MyLocation object that this tap refers to and then launch the Maps app by calling the openInMapsWithLaunchOptions: method.
Just note that it is opening up the Maps app, but you can choose to do whatever you want really.
Later on, here are some other great links if you need them:
http://www.raywenderlich.com - This is where I started, recommend you do the same. Use their search box. They sell some privatized/self-published PDF books too if you like that.
http://www.cocoacontrols.com - You could probably find a control someone has already written with maps.. use the search, filter for iOS only.
http://www.nshipster.com - Great building block site
http://objc.io - Great site for getting into more low-level development.

Monotouch: How to add/remove recipients balloons/bubbles for new message

I want to create custom email compose dialog and I need to implement "Add contact" func. like in standard iOS apps.
I haven't found any nifty controls so it seams it should be implemented manually.
So I wonder how to draw such an elements dynamically inside of MT.D element?
UPD:
Let me show a picture from here:
I haven't found any nifty controls so it seams it should be implemented manually.
Look at the New-Person View Controller in Apple documentation. They are all available to use from MonoTouch applications.

Resources