UITextView at the bottom of the view - ios

As a new MonoToucher, I have a question which I'm struggling for a while now:
In some cases in my app I need to display a UITextView with a button to its right, at the bottom of the screen.
Basically, I would like to manage some kind of discussion feed in which when the user navigate to a specific discussion he gets the related posts as a list and have a multi-line text input at the bottom of the list with a 'Post' button to the right.
Touching that textView should show the keyboard for input, and the height of the textView should be related to the data entered.
This is the same behavior as we have when we want to write a new Text Message in iPhone, or a post in Facebook.
Another requirement is, that when the user scrolls the posts list, that input (with the button) should not move.
I tried creating a UIToolBar with UITextView and a UIButton, but I can't make it work as expected.

Check out the BubbleCell sample, it does exactly what you want in C#:
https://github.com/xamarin/monotouch-samples/tree/master/BubbleCell

Related

Buttons in UITextView

I want to create a View very similar To the iOS notes application. The main function is to allow the user to get a check box in front of a line of Text.
My first attempt is this:
I have a UITextView where i try to insert buttons on the left side of the View, the Problem is i dont get the right y Position for each line and the whole text is offsetted even if there is no Button in Front of the line.
Question:
Is there a better approach, maybe much simpler or even built in functionality in UITextView i couldnā€˜t find?
If not, how do i get the exact y position of the line the cursor is currently in, so i can set the Buttons in the correct positions?

Is there any way to add a letter to the bottom left area of a UIKeyboardType.NumberPad?

The UIKeyboardType.NumberPad looks like this:
What I want it to look like is this:
Is there a way to overlay a view in just that corner when the keyboard is up to add this single key? Is this possible with Swift 4?
The reason I want to do this is for easy ISBN number input for users, and some ISBN numbers (10 digits) have an X in them.
There is no way to modify the keyboard and any attempt to position a button in the correct spot will be a hack you want to avoid.
Probably the cleanest solution is to create a toolbar and set the toolbar as the text field's inputAccessoryView. On the toolbar, add a button for your X and maybe some other buttons such as a keyboard dismiss button, a Next button, or a Done button, etc.

Text input pop-up for adding to tableview

I have a table view list and an add button at the top right. The user would press the button and a text field would pop up for a user to enter a string to be the label of the new item. Nothing new or special, what you'd expect from a "new playlist" type situation.
I am looking to have the small text field input that the user would type into. Most examples have the app move to a new view controller with a text field. I simply want a little box to overlay the current view that accepts a string. I cannot find/remember the name of the text box so I cannot find examples or code.
I think you are searching for something like
https://github.com/bmancini55/iOSExamples-DockedKeyboardView
Where your UITextField would be attached on the keyboard's accessory view.
OR
http://nshipster.com/uialertcontroller/
Where you use an UIALertController with an input field. I think the second one will resolve your problem more than the first one, because you are asking for a pop-up solution.
Hope it helps

Drag caret between text views

I am displaying a text document using many UITextViews, one for each paragraph*. When the user drags the caret around it obviously stops when he reaches the beginning or end of a paragraph. Is there any way of letting the user drag the caret between text views as if all the text was in one text view? In a way that is allowed in the App Store?
* There is a good reason for this, at least if my proof-of-concept actually succeeds in proving the concept.
This would be a pain in the ass to implement, but going off this answer as an indicator of cursor-on-text:
how to get selected text from uitextfield in iphone?
Check the position of the cursor, and if it matches the length of text in a textfield, start a gesture listener, and if it moves down and right, change the focus to the next textview. Keep your textviews in an array for easy accessing.

Animate only a part of an element

how can I animate only a part of an element?
I show/hide a div using jquery-ui's show method but I'd like to start/end the animation from/to a given height of the element.
My dev website can be seen here (link removed). When clicking on the 'Contact' button the contact page shows up or hides if it's already open. Since I couldn't find how to starts my animation from a given height I added a fixed button when it's closed, but when the contact button of the contact page overlaps the fixed button when it's closing...
Any help welcome!
looking for something like this??
http://jsfiddle.net/rlemon/F6Efp/8/
You can also add any fade or whatever effects. This is using a single button to animate both open and close. You could also attach a attribute to the button tag to define it's current state.

Resources