开发者

How to add a Boundary outline in UIView of Iphone.Please Read Description

开发者 https://www.devze.com 2022-12-18 14:43 出处:网络
I want to make a rectangle Boundary and to insert a UITextView and two buttons in that rectangle .If i making the rectangle by adding a subView in a fromUIView class than I am unable to interact with

I want to make a rectangle Boundary and to insert a UITextView and two buttons in that rectangle .If i making the rectangle by adding a subView in a from UIView class than I am unable to interact with the controls in the rectangle area which i inserted in the subview from Interface builder.

I am attaching a screen for that

How to add a Boundary outline in UIView of Iphone.Please Read Description

In this image I have to make a rectangle and have to insert a text view and two Ui buttons.If I am making rectangle from UIView and adding in View Controller than the controls added in this subview from Interface builder doesn't responds.So I have to add thes开发者_运维知识库e controls Programitically which create this task very tough.

Please Provide me a solution to make boundary of rectangle and than to add Controls.


Just put all the controls in a container UIView and set the borderWidth and borderColor properties of the container view's layer.


Ole Begemann is correct in his post of borderWidth. One important addition though is that you need the following line.

 #import <QuartzCore/QuartzCore.h>

mj

0

精彩评论

暂无评论...
验证码 换一张
取 消