Here I create two views(bar and icon) and I would like to make one call to @window.addSubview
to add them both.
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame UIScreen.mainScreen.bounds
@window.makeKeyAndVisible
bar = UIView.alloc.initWithFrame [[0, 0], [320, 100]]
icon= UIImageView.alloc.initWithFrame([[100,0], [100,100]])
@window.addSubview bar # I have two calls to addSubview
@window.addSubview icon
true
end
end
I would like something like this:
@window.addSubview bar, icon
or
@window.addSubview [bar,icon]
I realize the difference is nominal but it seems like there should be a way to call addSubview
on several views at once.