2011-10-11 59 views
0

我正在使用本機SMS應用程序。如何在GrowingTextView中允許可點擊的鏈接

我使用聊天泡泡在我看來,並在添加文本(我用UITextView

我想允許上聊天氣泡超鏈接..

一樣,如果有人味精我www.google.com然後而我按上聊天泡沫應該在瀏覽器中打開...

我使用GrowingTextView

txtViewGrowing.minNumberOfLines = 1; 
txtViewGrowing.maxNumberOfLines = 4; 
txtViewGrowing.returnKeyType = UIReturnKeyDone; 
txtViewGrowing.font = [UIFont fontWithName:@"Arial" size:12.0]; 
txtViewGrowing.textColor = [UIColor blackColor]; 
txtViewGrowing.delegate = self; 
txtViewGrowing.autoresizingMask = UIViewAutoresizingFlexibleWidth 
     | UIViewAutoresizingFlexibleTopMargin 
     | UIViewAutoresizingFlexibleBottomMargin 
     | UIViewAutoresizingFlexibleRightMargin; 

txtViewGrowing.autoresizesSubviews = YES; 
[txtViewGrowing setPlaceHolderText:@"Type to Compose"]; 

[self.view addSubview:txtViewGrowing]; 
//[txtViewGrowing.internalTextView becomeFirstResponder]; 


[txtViewGrowing sizeToFit]; 
[self.view addSubview:btnSend]; 
[txtViewGrowing resignFirstResponder]; 

是否存在的GrowingTextView任何屬性,以允許在超鏈接..否則給我解決我怎樣才能讓我的聊天泡泡聯......

在此先感謝...

回答

-1

對於的Android:你可以在屬性中使用autolink:web(如果你在eclipse中工作),則將其添加到textview的XML中:android:autoLink="web"

這會將您的textview中的每個web鏈接轉換爲可點擊的鏈接。