Im creating a tableview that displays a feed similar to the facebook iphone app news feed. Im just wondering what control i should use in my custom table cell that will allow me to show a mixture of text and hyperlinks. e.g. UserA has just sent you a message. Where "UserA" is a hyperlink and when the user clicks on it I need to be able to catch that event and send them to UserA's details.
Thanks in Advance
You should probably avoid putting individual touchable elements into the cells. It can become confusing if there is different functionality depending on where the user taps.
Can you just catch the selection of the cell and perform the appropriate action then?
Related
simply i want to add more buttons and use my own editTexts to get number and to change background theme as well.
any solution will be apperitiated thanks.
No, AccountKit UI is locked due to legal reasons regarding having a specific disclaimer visible on the screen at all times when sending SMS notifications.
The only customization you can do is to use AdvancedUIManager and insert your own fragments on header, body and footer positions on the UI.
docs: https://developers.facebook.com/docs/accountkit/android/customizing/#advanced
I'm relatively new to iPhone Development and I'm trying to create an app that's using a UITableView that needs to push to different Views. Right now I'm designing it to push to a different page each time a cell is clicked. It seems that from other posts that I've read that it's not a good idea as there will be a lot of individual View pages. I'm not sure how to accomplish this as I am designing each View to have a phone number, email, web site and SMS that goes to different sources/destinations. I've designed everything up to this point and it works, but need this final step in order to finalize the app. Any help or tutorial that someone could be point me to would be appreciated.
I'll try to be more specific. I have a main menu of categories that navigates to a submenu of other categories. Each category that the submenu navigates to has a phone link, email link, SMS link, and web link. Do I have to make separate pages/views for each category or is there a way to make a NSDictionary that will house all of the data for each category that has the URL links?
You need to be more specific in your question. It sounds as if you wish to push a subsequent UITableViewController onto a UINavigationController stack using a 'push' segue, with the data passed to the sub-category using a combination of the methods 'didSelectRowAtIndexPath:' to determine the clicked row, and 'prepareForSegue:' to pass the row data to the new UITableViewController.
Check out the Apple tutorial - https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/SecondiOSAppTutorial/ which covers all of these concepts in very simple terms.
I have a table view and in some of the cells there are links, I want to be allow the user to click on these links and view them in a webView (which I have already made). I don't want to use the row selection event because there may be more than one link in the cell. I came across TTTAttributedLabel and think it will be ideal. I don't need to add any style to the text in the cell, I only need to detect the links and capture the click event to open up my webview.
Any help would be greatly appreciated.
It looks like you can assign a TTTAttributedLabelDelegate to a TTTAttributedLabel that will get call backs for when a user selects different link types, but no opportunity for you to capture them and open your own web view (which I think is what you're trying to accomplish).
Instead, you might wanna check out OHAttributedLabel. It's similar in functionality, but when a user clicks on one of the links in the label, it calls -(BOOL)attributedLabel:(OHAttributedLabel*)attributedLabel shouldFollowLink:(NSTextCheckingResult*)linkInfo on it's OHAttributedLabelDelegate, which gives you the opportunity to handle the link tap yourself if you return NO.
I would like to know how to display a pop-up with some text, in an iphone application that I am developing. The part of the app I am talking about consists of some text pulled in from a plist file, all this happens in a view controller object which also consists of a button. When the user presses the button, I would like to show a pop-up window (not a small alert like the one obtained using UIAlertView but one similar to the pop-up ads that appear when you launch certain apps on the iphone, with the background dim and a window with a close button etc etc..), ya so anyway I would like to know how to achieve this, mainly if there is any pre-defined class that can make this happen. Any help would be highly appreciated. Thanks in advance.
You could use MBProgressHUD for this. You can add custom views in it and it also has the dimBackground property to dim the containing view and many other useful things.
For an app I am working on I want a custom keyboard to come up when you tap on an input field in a UIWebview, for example for UITextView i use this code :
myText.text = [myText.text stringByAppendingString:#"a"];
but i don't know how can i fill a text field in UIWebVIew
Any help would be very much appreciated; thanks!
I don't think it's possible to use a custom keyboard for a text field within a UIWebView.
There is bidirectional communication with the UIWebView, but it is a little convoluted.
You can use stringByEvaluatingJavaScriptFromString to execute any javascript in the context of the web page. That can be used to send data to the web page, modify forms, or poll for data and events.
You can use webView:shouldStartLoadWithRequest:navigationType: to receive notifications from the web view. Define a custom scheme like myapp: and handle all such requests returning NO from shouldStart. You can use ajax style calls to trigger the notifications, although the actual ajax call will always fail because you are returning NO.
If you want to have a custom keyboard show up, you must send a notification to the host application via your custom scheme, display a UITextView over the web view, then send the results back via javascript.
At least, that is the documented way to do it.
Check dcorbatta's answer in this article Custom Keyboard in UIWebView
He suggest to use a UITextField as a "media" when you detect keyboard coming up inside a UIWebView. Thus, you can use whatever Keyboard type you want on the UITextField. After users taps something, copy the text in UITextField the media via JavaScript ActiveDocument.
I spent too much time investigating that.
Blur the text inputs using JavaScript or jQuery.
Use on screen keyboard like any UIjquery plugin
Now you have to take a look at this nice keyboard and learn how to integrate it into you web pages.
http://net.tutsplus.com/tutorials/javascript-ajax/creating-a-keyboard-with-css-and-jquery/
One limitation.
It works only for your pages unless you hijack the page when it is done loading and attaché your keyboard and blur all text inputs when they get highlighted or focused.