Access text in Share Extension - ios

I am trying to create a share extension for my app. Instead of using the SLComposeViewController I am creating a custom view with UIViewController. However I am not sure how I should now access the text to display it in the label in my view?
What should I be doing?
Thank you

Related

creating a scrollview with data coming from database and variable number of elements for ios

So I was trying to create a sample ios application. As I am designing the app UI with the storyboard (and not coding), I find Xcode really hard to understand.
what I want to do is I added a scrollView to the view controller. now what I want to do in the scrollView is simple.
I want my scrollView to have buttons (vertically stacked) and it does some action on the basis of the data it is getting from the database. let's suppose it is getting links from the database and on a click of those buttons those links open. now the data may contain 10 links, or 20 links .. basically, we want it to be according to the database.
now if I was designing the UI programmatically it would look something like
ScrollView{
for loop...{
button("for example name coming from the database"
}
}
or atleast this is what I know of.
so how to do the same with storyboard ?
like we first take it's refernce to the uiViewController class.. and then ?
You need to add buttons programmatically if they are created dynamically depending on external non static data. Create new UIViewContoroller class and implement it with connecting storyboard file, the easiest would be to add buttons inside some kind of UIStackView which is inside scrollview imo, or by using UITableView if there are significant number of links to display.

Swift create tableview with custom cell within UIAlertviewcontroller

I am trying to create Tableview with custom celldisplay within UIAlertviewcontroller using swift 4. Please provide some idea or sample link here.
Native UIAlertviewcontroller does not support embedding custom views. You can create custom alert controller or use one of many open source libraries and pods.

Custom keyboard with emoji (like kimoji)?

I was wondering how the KIMOJI works?
I read everywhere that you can only create custom keyboards which insert text, not custom emoji.
Any ideas?
I actually had been wondering how to create a custom keyboard extension inspired by KIMOJI for stickers and just finished writing a response here: Add Stickers in Custom KeyBoard Extension
The only modification I would suggest is that instead of using UIViews to hold a few buttons, you may want to try holding many stickers in a UICollectionView. The KIMOJI app allows you to scroll horizontally through the stickers/emoji and a UICollectionView would allow you that functionality.
I hope this helps.

Formating Text within a UITextView using Swift

I want to add an "About" View into my (swift) iOS App. Currently I have centered a UiTextView into this ViewController. Now I am wondering if it's possible to format text in this TextView like I can for instance in a html website?
Or is it better to use some other component for this?
Thanks
Since it's not supposed to be editable (it's an about page), why not go with a UILabel?
You can use NSAttributedString to get access to more customization options than what you get with NSString.

How to make a login screen like Facebook app?

How can I make a login screen like the Facebook app with "Email" and "Password" textfields?
Facebook Login
I'm really new to iOS programming, sorry if this is an easy question.
First of all you have to understand UIViews and UIViewControllers creation and management.
Then, you could ask your self if you want to create the interface through xib files or programatically. The first way is quite simple. By means of drag and drop operations you could create a user interface in a short time. The second, instead, is more complex for a newbie but I think it could be a valid solution to understand stuffs.
Note that each operation that you do in xib files can be done programatically.
Now, I'll try to explain what elements you need to create that interface.
To create the interface like the following you could create a xib view interface. The view for this interface is the container for your elements. To the container view you could add a UITableView with a grouped style. This UITableView has 2 rows and each row allows to enter text by means of UITextField. To do this, you have to create it programatically. No chance to do it with xib.
Login and signup can be created with two UIButtons. To those buttons you need to attach some actions.
Finally the background image could be set programatically as a background image for your container.
This is a simple description on how to create such an interface. Before starting, I suggest you to read some tutorial on how to:
Use UIView and UIViewController
Create interface trough xib
Interact with interface xib through outlet and actions
Use UITableView and understand its management
Customize or editing UItableViewCell
Use UIImageView and/or UIImage
A good starting point for iOS application development could be www.raywenderlich.com/tutorials.
Hope it helps.
1)In your Xib file..add an image view..set it to the image you want..that will be background like in the Facebook pic.(blue) and that image should include middle (email and password background) part as well.
2) Drag and drop UITextField on it. Make the background custom.
Since you are new..I will point out the details..and then you search on them that way you will understand better :
Search on each of these things on google..cant give info for each.
1)In your Xib file..add an image view..set it to the image you want..that will be background like in the Facebook pic.(blue)
2)The middle part is a UITableViewCell with one section and 2 rows..search on it..
3) And the Log in and sign up are UIButtons..add them in xib and make them IBOutlets..again search on it

Resources