element-ios/Riot/Modules/Common/SectionHeaders/SectionHeaderView.h
ismailgulek a50358f9bb
Section header views adaptation to safe area insets
Signed-off-by: ismailgulek <gulekismail@gmail.com>
2020-04-22 14:00:31 +03:00

60 lines
1.6 KiB
Objective-C

/*
Copyright 2014 OpenMarket Ltd
Copyright 2020 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#import <UIKit/UIKit.h>
/**
Section header view class. Respects left and right safe area insets and layouts its subviews.
*/
@interface SectionHeaderView : UIView
/**
Default value: 20.0
*/
@property (nonatomic, assign) CGFloat minimumLeftInset;
/**
Default value: 16.0
*/
@property (nonatomic, assign) CGFloat minimumRightInset;
/**
Default value: 30.0
*/
@property (nonatomic, assign) CGFloat topViewHeight;
/**
A view which spans the top view. No frame value will be used. Height will be equal to topViewHeight.
*/
@property (nonatomic, strong) UIView *topSpanningView;
/**
Header label. Only height in frame will be used.
*/
@property (nonatomic, strong) UILabel *headerLabel;
/**
Accessory view for top view. Both width and height will be used.
*/
@property (nonatomic, strong) UIView *accessoryView;
/**
A view which spans the bottom view. No frame value will be used. Height will be remaining of the view at below topViewHeight.
*/
@property (nonatomic, strong) UIView *bottomView;
@end