UIToolbar UIToolbarPositionTop
Constants to identify the position of a toolbar for appearance customization (see setBackgroundImage:forToolbarPosition:barMetrics:).
typedef enum {
UIToolbarPositionAny = 0,
UIToolbarPositionBottom = 1,
UIToolbarPositionTop = 2,
} UIToolbarPosition;
Constants
UIToolbarPositionAny
Indicates the toolbar may be in any position.
UIToolbarPositionBottom
Indicates the toolbar is at the top of its containing view.
UIToolbarPositionTop
Indicates the toolbar is at the bottom of its containing view.
UIToolbar UIToolbarPositionTop example.
[[UIToolbar appearance] setBackgroundImage:<myImage_1> forToolbarPosition:UIToolbarPositionTop barMetrics:UIBarMetricsDefault];
could be made to work by adding
//Connect this to your toolbar in Interface Builder
@property (weak, nonatomic) IBOutlet UIToolbar *tref;
to your header. Then just do
[tref setBackgroundImage:<myImage_1> forToolbarPosition:UIToolbarPositionTop barMetrics:UIBarMetricsDefault];
could be made to work by adding
//Connect this to your toolbar in Interface Builder
@property (weak, nonatomic) IBOutlet UIToolbar *tref;
to your header. Then just do
[tref setBackgroundImage:<myImage_1> forToolbarPosition:UIToolbarPositionTop barMetrics:UIBarMetricsDefault];
Example of [UIToolbar UIToolbarPositionTop].
[tool setBackgroundImage:barImage forToolbarPosition:UIToolbarPositionTop
barMetrics:UIBarMetricsDefault];
barMetrics:UIBarMetricsDefault];