How to add border outline to UIView Iphone. Please read the description.

I want to create a Boundary rectangle and insert a UITextView and two buttons in this rectangle. If I create a rectangle by adding a subView to the UIView class, than I cannot interact with the controls in the rectangle area, I am inserted into the preview from the interface constructor.

I am attaching a screen for this

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

In this image, I have to make a rectangle and insert a text view and two Ui buttons. If I create a rectangle from UIView and add it to the View Controller, than the controls added in this view, from the interface builder does not respond. Therefore, I have to add these controls. Software that create this task is very tough.

Please provide me a solution to draw the border of the rectangle and add controls.

+6
iphone uiview
source share
2 answers

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

+12
source share

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

  #import <QuartzCore/QuartzCore.h> 

Mj

+2
source share

All Articles