-1

I want to create a Timer Application in xcode apps.

But it needs two UIViews, I have only one UIView.

How to add the another UIView in xib?

Arulkumar
  • 12,966
  • 14
  • 47
  • 68

2 Answers2

3

Search before u ask Read this

You can use storyboard it is better read about it link

Community
  • 1
  • 1
Omarj
  • 1,151
  • 2
  • 16
  • 43
1

To create a standalone user interface (XIB):

File -> New File -> iOS -> User Interface

Then choose:

Application (includes delegate and window) Window View Empty To create a new UIViewController class with a user interface:

File -> New File -> iOS -> Cocoa Touch -> UIViewController subclass -> Click Next

Then, name the new view controller class and select "With XIB for user interface."

OR

Choose objective-c class and then select UIViewController as subclass.

Apple moved all objective-c class templates into the "Objective-C class" template. They have custom functionality, like "With xib for user interface", there too.

IronManGill
  • 7,222
  • 2
  • 31
  • 52
  • i know but UIViewController not display – Muthukamatchi Ganesan Oct 10 '12 at 09:32
  • You want to create a new file or simply an xib ?? – IronManGill Oct 10 '12 at 09:33
  • This would create all the 3 files check all your files... But tell me have u followed all the instructions though ?? – IronManGill Oct 10 '12 at 09:36
  • when i click new file it just display the obejective c class, category , protocaol and rest case – Muthukamatchi Ganesan Oct 10 '12 at 09:38
  • Have you tried my edited post ?? I think it will work .. check it out – IronManGill Oct 10 '12 at 09:44
  • it k guy, leave it, i have another idea. when i click the add button get the information in small popup window its possible? – Muthukamatchi Ganesan Oct 10 '12 at 09:46
  • Yes it is quite possible ... u would hav to use a popupcontroller or u can work with a uiview also .. tell me your exact issue :) – IronManGill Oct 10 '12 at 09:48
  • i am new in this xcode . so do u have sample code for popup meas send it me, or give the links – Muthukamatchi Ganesan Oct 10 '12 at 09:49
  • You can create an alertview if you like .... Here are some links please refer ... http://stackoverflow.com/questions/4988564/how-to-implement-a-pop-up-dialog-box-in-ios and http://stackoverflow.com/questions/3737911/how-to-display-temporary-popup-message-on-iphone-ipad-ios – IronManGill Oct 10 '12 at 09:52
  • You are welcome @Muthukamatchi any further help please tell on my gmail id ... Check the answer if its correct :) – IronManGill Oct 10 '12 at 09:55
  • Then you can simple call a uiview on a button click and add anything in it at runtime like entering in a textfield etc.... add the uiview from the xib .... Basically wat do u want on runtime ? – IronManGill Oct 10 '12 at 10:03
  • Please continue chat on gmail with me as stack overflow does not allow long chats within comments :) ... Ill explain to u on my gmail id here - tejesh.gill@gmail.com ... connect the button through xib set the delegates :) – IronManGill Oct 10 '12 at 10:18