tags:

views:

118

answers:

2

Hi all,

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

http://www.algoworks.com/images/img065842101.jpg

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 these controls Programitically which create this task very tough.

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

+1  A: 

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

Ole Begemann
A: 

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

mj_