Hi similar to the facebook and iphone app, i have an # function which should link to the users page. My question is how do i go about doing this, what control should be used, for instance i may have some text like this;
"hey #pablo are you and #paul coming over tomorrow"
In that text #pablo and #paul should be clickable.
I hope i am making sense?. Thanks
I have written an article on an interactive rich text UILabel and included full source-code... enjoy!
As promised article is here.....
You can use a uiwebview to do it and add the text with html to the webview.
Related
as you know the Mail app in iOS 5 have a rich text editor is there any possible way to use this feature for a regular UITextView ?
I know of two fundamental approaches to creating a rich text editor in iOS 5:
Use Core Text and a custom view. I don't have any experience with this approach.
Use a UIWebView (instead of a UITextView) and the contentEditable HTML attribute. The basic idea is to load a custom HTML document from your app resources directory. The bare minimum that it needs is this:
<div contentEditable>TEXT_PLACEHOLDER</div>
To initialize the rich text editor view:
1. Load the contents of this file into an NSMutableString and replace the TEXT_PLACEHOLDER string with the text you want to edit.
2. Send the loadHTMLString:baseURL: message to the UIWebView with that HTML string.
Now you have a UIWebView displaying your text inside a div with contentEditable. At this point, you should be able to run your app tap on the text, and be presented with a cursor and be able to add/remove text. The next step is to add rich text formatting functionality. This is done with a set of simple javascript function calls. See the Mozilla documentation on contentEditable for a great reference. You will also want to add a Javascript function to your HTML template file like this:
function getHtmlContent() { return document.getElementById('myDiv').innerHTML; }
So you can easily retrieve the edited text as HTML using [myWebView stringByEvaluatingJavaScriptFromString:#"getHtmlContent()"]. You can also add custom context menu items like you show in the screen shot in your question.
If you have access to the Apple iOS dev center, the WWDC session Rich Text Editing in Safari on iOS talks all about this approach.
A variation of this approach is to use a third-party rich text editor like TinyMCE. I've heard of some success with integrating this into a UIWebView in iOS 5. Again this relies on the contentEditable attribute.
Here is my implementation. Still haven't added UIMenuController functionality, but it's planned to be added soon.
https://github.com/aryaxt/iOS-Rich-Text-Editor
The iOS 5 rich text edit control is also present in the notes app in iOS 4 (make a rich text note on the computer and sync it to see).
This is a custom Apple-made control which they use in their own apps, but it is not published in any official developer API. It's probably in the SDK somewhere, but because it is undocumented, even if you find it and use it, Apple will reject your app.
Basically, if you want a rich text control you will have to make your own.
Edit: Try using this: https://github.com/omnigroup/OmniGroup/tree/master/Frameworks/OmniUI/iPad/Examples/TextEditor/. I haven't used it, so I don't know how well it will work. (Link from this question)
look at https://github.com/gfthr/FastTextView which is more good open source editor than Omni editor
I want to create an iPhone app that uses a navigation scene similar to the one pictured in the link
Please note I do not want this to only work for iPad, I want it to work for iPhone exactly as pictured, when you click on a tableview item it hides the tableview and makes that view full screen. I want ideas on how to do this because I cannot figure it out myself.
Thanks
Facebook guys have done brilliant job in the new version of the app. The similar open source code can be found from here - JTRevealSidebarDemo. Please note that as of June 2014, this project has been discontinued, so you'll probably have better luck with a project from the list below.
It reveals technique behind doing split view for iPhone.
Some other open source code:
JWSlideMenu
DDMenuController
PKRevealController
ViewDeck
ECSlidingViewController
MWFSlideNavigationViewController
MFSideMenu
SASlideMenu
HHTabListController
MTSlideViewController
MTStackViewController
MMDrawerController
DMSideMenuController
JVFloatingDrawer
How about projects with storyboard compatibility?
I found 1 more slide menu which is compatible with storyboards:
SASlideMenu
Another storyboard-compatible menu is
ECSlidingViewController
and
ViewDeck
from Sagar's answer. They both have storyboard examples (for the last one link is ViewDeckStoryboardExample)
For anyone else looking for an Android version, take a look at:
android fb like slideout navigation
emerging ui pattern side navigation
I realize you asked about facebook, but now that ios7 is out, and this is the defacto thread i thought id post here.
For an effect similar to the kindle app on ios7 you can use:
https://github.com/romaonthego/REFrostedViewController
If anyone else is looking for a way to implement this in MonoTouch now known as Xamarin.ios, take a look at this article I just found. monotouch slide out navigation
EDIT
I just found that they have a free component for this!
flyoutnavigation
I noticed no one listed this wonderful class... SWRevealController.
I use it with my project apps all the time. It's Easy to use and heavily documented... There are also a few examples John gives to the user to understand how it works or if you'd like to derive your project from... Hope this helps
SHSidebarControllerwith filder effect.
This might be helpful to you.. try this :)
This looks to be the best match for me.
PKRevealController
It has nice scroll effect with finger and moves back on partial drag.
https://github.com/pkluz/PKRevealController
MMDrawerController is very good option.
You can configure many things. try it once
https://github.com/mutualmobile/MMDrawerController
I've been working on a floating-style navigation drawer that I hope people will like. It's on GitHub, take a look.
I am writing an app and I want to show the login screen just like in iPhone where you have to enter 4 digit code to login. What's the best way to do this? Is there a UIView that comes with the SDK or will i have to design my own keyboard
Thanks
CocoaControls is an excellent site to browse Cocoa & Cocoa Touch custom UI components:
http://cocoacontrols.com/
You can use PINView: http://cocoacontrols.com/platforms/ios/controls/pinview
Or KVPasscodeViewController: http://cocoacontrols.com/platforms/ios/controls/kvpasscodeviewcontroller
Or JSLockScreen: http://cocoacontrols.com/platforms/ios/controls/jslockscreen
Previously answered at steps / idea for a Iphone passcode like custom interface for Application: this option from that question looks promising (see https://github.com/vikingosegundo/KeyPad).
You can use this latest source code to do so. URL is https://github.com/abury/ABPadLockScreen
Hopes this will help you.
Here is a screenshot of the Arsenal Football Club iPhone app : here.
Can you see the little pop-up used to highlight the next match ?
Well, do you have any idea how they did it ?
Thanks !
iDevRecipes just came out with a post on something just like this. Check it out, it should answer your question. http://idevrecipes.com/2011/03/08/how-does-the-instagram-iphone-app-implement-a-custom-tab-bar-notification/
This article might help: How does the Instagram iPhone app implement a custom tab bar notification?
I am developing an application for iphone which needs to load some description to a UIWebView. But text that loads into the UIWebView shows some html tags like <p></p>.Is there any way to remove these type of tags?
Thanks in advance
I asked a similar question the other day and got some good responses. I imagine one of these could suit your needs.
anyway to delete all <a href=> tags with javascript after the page loads on an iPad?
Hope it is helpful!
This is the best answer and is exactly what you are looking for ...
Write the following script in the webView delegate method. ( UIWebviewdidfinishLoading)
NSString *myText = [webView stringByEvaluatingJavaScriptFromString:#"document.documentElement.textContent"];