I am trying to add some interactive buttons on pdf pages. I am showing Pdf file using Apple PDFKit and I have implemented UITapGesture, so when user tap on screen I show a annotation on it, issue is I want to mark this annotation as number like 1,2,3 etc. and whenever user click on this annotation user should be prompt a message that do you want to delete it? and then remove it.
Now,
How can I give annotation as numbers 1,2,3 etc.?
How can I add action on this same annotations? so that user can delete it on action?
Note: If you are unable to understand use case, then just take an example of placing balls of snooker game on different places.
Related
I'm working with an iOS application. What I'm trying to accomplish,
Let's say the text for the UILabel is "Rikard bla bla bla Rikard".
So in this text I have tagged two people. And when I click on one of them I display a detailed view about that person. So this is working great if I just have one user named Rikard, and it works with multiple too and I can present the detailed view. But my problem is that I don't know which user I clicked on if I have tagged multiple people with the same name. I know I have to go for the ID. Right now I display by name, so it's not that strange that it's not working.
Should I save information in the database in which order the user entered the two tags or how can I ever know who is who?
Please point me in the right direction. The functionality is working great, it's just the logic for who to display when I click. I want to recreate the tagging system that Facebook have when people comment a photo and tag people in it. You can write multiple names there and Facebook will of course know who is who.
ADDED
So what I do when I'm creating my tags. I choose from a list of available tags or I can write them. I will always know which tag to save the current comment with. But the problem occurs when I display them in to different parts,
The first part is just a UILabel with all the tags in a row, separated by blank space. Here I know where the user tapped and I can display the detailed view for the with the name.
The second part is all of the text, I can find where the tags are located, on which line and between what pixels on that line. And I know when I click on them.
But what I need is the logic for clicking two tags with the same name in the same UILabel. Should I somehow save the order of how I saved the tags?
One option that comes to mind is using an NSAttributedString in the label. You may add arbitrary attributes to ranges of text using that class, and its mutable subclass. Thus, you could add a custom attribute to the range of each user's name, and assign for the corresponding value some unique identifier for the user – possibly an NSNumber or NSString that can be used to retrieve the proper information.
I'm making a custom InfoWindow for my markers. I followed the official Google Tutorial : Youtube link
Here is my .xib
User interaction is enabled...
My infoWindow show up above the marker as you can see on the screenshot :
But when I click on the pseudo input, the keyboard doesn't show up. Nothing happens!
I don't understand why it does that, because the user interaction is enabled...
The full View Tree :
From https://google-developers.appspot.com/maps/documentation/ios/marker?hl=ar-SA#info_windows
Note: The info window is rendered as an image each time it is displayed on the map. This means that any changes to its properties while it is active will not be immediately visible. The contents of the info window will be refreshed the next time that it is displayed.
Kind of lame, imho, especially if you have implemented the google maps js API, which provides complete control within any custom infoWindow.
I believe you will need to wire up an entirely separate overlay to make it interactive.
I have ipad app i want that user should enter URL in textField and it should validate and should show like facebook when we enter any url it shows some page of that web or content like that in ipad any idea how to get this i know how to validate URL but how it show it like facebook page.
Attached is the screen how i want
I think you will do this in TextView not for TextField.
Some TextView do like this:
txt_note.editable=NO;
txt_note.dataDetectorTypes=UIDataDetectorTypeAll;
This will detect all URL,Phone NO,Address,etc.
OR(Method 2):
You can also see this in TextView Property in Xib file for TextView on
Right hand side.
personally i would create a customized view to show everything. You create a class URLSnapView subclass of UIView where you can place all the elements you need. a label to show the url, one for the description, a uiimageview to show your image. you can set up everything how you like it the most.
On the textfieldshouldreturn you can place the a validation method that return a BOOL value. If the result is true, it will create an instance of your customized URLSnapView with the data from your website that you will get with your NSDataDetectorType. You can also add a UIWebView to place a small area with your website that's even viewable ;)
I'm not sure if I use the phrase correctly.
The function I want is that after user typed some characters (or clicked a button), a list will be shown under the textfield.
An easy example is Google search. After you typed "fb" or "faceb", it shows "facebook" in the suggestion list.
The content of the list is stored in an array, which comes from the return of web services.
Thanks
You've got to intercept the keystrokes with UITextView textViewDidChange. Then, with each keystroke, you implement the lookup algorithm and display your list of selections above or below the UITextView where the data entry is occurring. The list has to somehow be "touchable" to select from it.
Ray Wenderlich has a tutorial that shows how this can be done over at his blog
He creates a table below the text field that is touchable.
There is also a sample project there.
i need one more help.
First question is: I understood that the sections, text, images, etc on a MonoTouch.Dialog will be created dynamically. But can i have buttons as well? If yes, how can i have the events of that button binded.
Second question is : Basically i have a search text, and a button, on the click of the button, the text is sent to the Twitter-url, to get the tweets, these tweets need to be displayed, now they contain, images, texts, and reply and a favourite. Can the search result and the Search Button+Edit box, be the part of one ViewController?
But can i have buttons as well?
Element in the DialogViewController often act like buttons. But if you want a real UIButton you can do something like: Monotouch.Dialog two tables
Can the search result and the Search Button+Edit box, be the part of one ViewController?
I don't see any problem doing that. Use the code from the above link and add a EntryElement.
the text is sent to the Twitter-url, to get the tweets, these tweets need to be displayed
Have you looked at TweetStation ? It's an open source application that is based on MonoTouch.Dialog. It can likely help you answer questions on both fronts.