Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Nov 29, 2007, 04:43 AM   #1
macrumors regular
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
Access controls in NSView

Hi, I am using Cocoa with Obj-C on XCode 2.4.1
I have a 4 views (with different controls in each of the view) added to NIB and accessing it through Controller. I am able to show different views whenever toolbar buttons are clicked.
I want to set the controls with some default values at the time of showing the view. For setting these controls in views, apart from awakeFromNib & windowDidLoad what are the other methods where I can set the controls. Will there be anything like constructor for view? How to set?

satyam90 is offline   0 Reply With Quote
Old Nov 29, 2007, 05:07 AM   #2
Moderator emeritus
kainjow's Avatar
Join Date: Jun 2000
NSViews are initialized via the initWithFrame: method. They get called awakeFromNib if they are loaded from a nib, but you can't always rely on that, so use initWithFrame.
kainjow is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Trying to subclass NSView Hans Kamp Mac Programming 10 Aug 31, 2014 09:39 AM
How would I set a static ip for remote access if I don't have access to the router? pruppert OS X Mavericks (10.9) 8 Feb 5, 2014 06:05 PM
'Parallels Access' Launches in App Store, Bringing Mac and Windows Access to the iPad MacRumors iOS Blog Discussion 49 Sep 16, 2013 11:10 AM
Custom NSView with subview of NSSplitView ArtOfWarfare Mac Programming 3 Aug 20, 2013 05:16 AM
NSView and NSBezierPath - modelling free fall of an object moray95 Mac Programming 0 Mar 7, 2013 09:53 AM

Forum Jump

All times are GMT -5. The time now is 04:07 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC