This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Divider --> | |
<!-- Usage: <View style="@style/Divider"/> --> | |
<style name="Divider"> | |
<item name="android:layout_width">match_parent</item> | |
<item name="android:layout_height">0.5dp</item> | |
<item name="android:background">?android:attr/listDivider</item> | |
</style> | |
<style name="TallDivider"> | |
<item name="android:layout_width">match_parent</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ | |
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; | |
if (self) { | |
self.selectionStyle = UITableViewCellSelectionStyleNone; | |
self.baseView = [[UIView alloc] init]; | |
[self.baseView setBackgroundColor:[UIColor whiteColor]]; | |
[self.contentView addSubview:self.baseView]; | |
PREPCONSTRAINTS(self.baseView); | |
ALIGN_TOP(self.baseView, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For iOS9, there is a new way(buggy in iOS7,8) to calculating the cell height | |
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
return UITableViewAutomaticDimension; | |
} | |
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
/* Return an estimated height or calculate | |
* estimated height dynamically on information | |
* that makes sense in your case. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface UINavigationBar (Addition) | |
- (void)hideBottomHairline; | |
- (void)showBottomHairline; | |
@end | |
@implementation UINavigationBar (Addition) | |
/** |