My questions below are about doing this with Interface Builder, not in code.
I have a XIB with two views. One of them is default view (Table View) and I add the second (Activity Indicator View) as a subview in code. my questions are:
activityIndicator.frame = CGRectMake(160, 240, 30, 30);
)[self.view addSubview:self.activityIndicator]
)Yes, to both questions.
The xib editor has a "Size inspector" that looks like a ruler icon near the top right of the Xcode window. That allows you to specify the size and location of a view inside its parent view. There are also controls that determine what happens to the subview when its parent changes size...on rotation, for example.
You can make a view into a subview either by dragging it into the parent in the layout section of the editor screen or by arranging views in the hierarchy window under "Objects".