如何將邊框添加到uitextview稍微超出其界限。我可以給邊界的位置或我必須添加自定義邊框,並給它的位置。任何幫助將不勝感激。在uitextview周圍添加自定義邊框,但幾乎沒有超出範圍
回答
這很容易。你必須添加石英核心框架
和寫入以下行
CALayer *imageLayer = textView.layer;
[imageLayer setCornerRadius:10];
[imageLayer setBorderWidth:1];
imageLayer.borderColor=[[UIColor lightGrayColor] CGColor];
我知道,但我想給框架的TextView的邊框。 – 2012-01-10 09:40:11
是否意味着你必須顯示textView的邊框? – Hiren 2012-01-10 10:11:38
添加 「QuartzCore」 框架和.h文件中導入它在你的HeaderFile
#import <QuartzCore/QuartzCore.h>
UITextView *TextView;
用於在TextView中設置邊框
TextView.layer.borderWidth = 1.0f;
TextView.layer.borderColor = [[UIColor grayColor] CGColor]; //[YounCan Use any Color For Border]
這有非常簡單的集成和輝煌的文本視圖定製:https://github.com/99centsappdevelopment/JSTextView
嘗試發佈多個鏈接到您的項目:例如一些相關的行。如果你想保持它的促銷(和*輝煌*),張貼它作爲評論。 – Bigood 2015-02-09 18:41:57
- 1. IndexOutOfRangeException,但沒有超出範圍
- 2. Silverlight:在網格周圍添加邊框
- 3. 如何在QWidget周圍添加邊框?
- 4. QLabel在文字周圍添加「邊框」
- 5. 在範圍中定義的函數,但編譯器抱怨它超出範圍
- 6. 如何在邊框周圍添加另一個邊框?
- 7. 在自定義UIBarButtonItem周圍設置邊框
- 8. 在TreeViewItem的所有子節點周圍添加邊框
- 9. 列表索引範圍的錯誤時,沒有超出範圍
- 10. 超出範圍的異常,但索引在範圍內! WP 7.1
- 11. 爲什麼它給索引錯誤超出範圍,雖然我幾乎肯定我在範圍內?
- 12. 邊框沒有給出,但顯示在彩色背景圖像周圍
- 13. Python NetworkX邊緣列表超出範圍
- 14. 圍繞自定義LinearLayout繪製邊框
- 15. SDL_image超出範圍
- 16. RowIndex超出範圍
- 17. NSURL超出範圍
- 18. nsstring - 超出範圍
- 19. NSNumber超出範圍?
- 20. Javascript:超出範圍?
- 21. IndexError ...超出範圍,
- 22. NSDate超出範圍
- 23. Java超出範圍
- 24. googletesting超出範圍
- 25. 蟒:超出範圍
- 26. android:pointerIndex超出範圍
- 27. 圖像周圍的邊框
- 28. Android - ListFragment周圍的邊框?
- 29. 索引錯誤:字符串超出範圍,但它不應超出範圍?
- 30. PreparedStatement拋出索引超出範圍時,它不超出範圍
只需設置它RECT了與CGRectMake屏幕......這不像你的設備是會爆炸起火... – CodaFi 2012-01-10 04:51:06