I am developing one message application in ios for iPhone .
i have one textview in which i have to write name of persons and on input space in uitextview i have to show the previously entered content in different text with different background .let me explain with image!
can anyone help me how can i achieve this kind of thing in my text view with CROSS MARK and on click of Cross Mark I want to delete that bubble?
so when user inputs the space after write some string in textview then it will convert with following view in green background with cross button..
You want to use some type of token field. Search github. Something like this.
Related
I am trying to implement a view which will load text from sqlite database (every sentence in a text will have unique tag in database) and will allow to execute some code while sentence is clicked (on-click executed method should then scroll clicked sentence to the center of the screen and change it's color/background color/font size to emphasize it)
Is it possible without using webview and js/js-native bridge? Which approach should be taken to implement such a view? Any help and comments highly appreciated!
Hmm, you could also considering using NSAttributedString together the Core Text Framework and attribute each sentence and attach some extra info about. Next you lookup the attribute below the tap position of the view. Once you have that you can retrieve the extra info again and do whatever you want with the tap.
After the tap you could then alter the properties of that part of the text. E.g. different font colour etc.
This tutorial on the internet looked interesting:
http://www.raywenderlich.com/4147/how-to-create-a-simple-magazine-app-with-core-text
I've done a lot of googling and am at the end of my rope so here goes ... I just need to know if this is possible so I can design a series of screens for an Iphone app.
In my app you are able to leave comments on a certain topic, I would like an icon in the toolbar that displays a word bubble with a plus sign in the center when there are no existing comments and if there are existing comments I would like to display the same word bubble but instead of the plus I want to show the number of existing notes programatically.
Is this possible?
thank you
Yes, it's possible. You populate a toolbar with UIBarButtonItem instances. You can create one of these using
-(id) initWithCustomView:(UIView *)myCustomView;
In your custom view, you can put any graphics you want, including a plus sign, or a subview with a UILabel that shows the number of comments.
When the status changes (comments are added or removed), you just need to create a new UIView and set the toolbar.customView to that view.
I would like to implement something like MMS app on iPhone, where user will have an option to include an image and text.
The way I did is i created a UIUiew and included a UITextView and UIImageView inside it, and when user selects an image it goes in to the UIImageView and the user can type in the UITextView.
But the problem that I am facing is once you insert a UIImage how do you put a cursor after the image so that user can delete(backspace) the image and that space free's up and it becomes available for the user to type in more text.
Simple answer: You cannot mix text and images in a UITextView. If you want to achieve a behavior like this, you should look into using Core Text to render the text yourself (it supports other elements inside the text via certain callbacks through which you tell the text system how much space it is supposed to reserve for the image.
To make the text editable, you would have to implement the text editing protocols UITextInput and UIKeyInput. Which means you have to basically write your own text editor. It's possible but it's a lot of work.
i want to develop a application like notepad app of iphone or ipod. i try my level best to design a uitextveiw like a paper with lines but it has a lot of problems like background image does not scroll with scroll of uitextview. and does not reapeat itself when text increases the background image.
its seems to me that the notepad app use a table view for taking input from user how i donot know.
so anyone who can tell me how to design a view like notepad app.
use a tableview and then place text field in each row such that if the text field limit reach the maximum length the next row text field become first responder. and when user click save then read data from all text field and then save it where u want.
but the only problem that i am facing is when the user past some data then i am unable to show that data in next text field if the past data is larger than the maximum length of a text field.
hope this help others.
I have some text that I need to load from an XML file. The idea is to be able to make the text interactive. I should be able to tell when a user taps a piece of the text, like in the WordWeb app. I know this seems to be the kind of job that a UIWebView is for but I want to avoid generating HTML and implementing handlers for the hrefs. I hope that made any sense.
Another way could be using a UITableView with UITextViews or UILabels as content views for the cells. However, I couldn't find out how we can customize the appearance of the table view, add a border to the view for example.
The end result expected is a view that looks like a page from a book but pieces of the displayed text can be tapped and bookmarked etc.
Am I even thinking in the right direction?