no message

This commit is contained in:
Peter
2017-09-08 20:19:20 +03:00
parent 4e1152655d
commit 7903caf3c0
12 changed files with 67 additions and 4 deletions

View File

@@ -211,6 +211,9 @@ const NSUInteger TGAttachmentDisplayedAssetLimit = 500;
}
_collectionView = [[TGAttachmentCarouselCollectionView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, TGAttachmentZoomedPhotoHeight + TGAttachmentEdgeInset * 2) collectionViewLayout:_smallLayout];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_collectionView.backgroundColor = [UIColor clearColor];
_collectionView.dataSource = self;
_collectionView.delegate = self;

View File

@@ -31,6 +31,8 @@
{
_whiteFooterView = [[UIView alloc] init];
_whiteFooterView.backgroundColor = [UIColor whiteColor];
//_whiteFooterView.layer.zPosition = -1.0;
_whiteFooterView.userInteractionEnabled = false;
[self insertSubview:_whiteFooterView atIndex:0];
}
}
@@ -43,9 +45,12 @@
CGRect bounds = self.bounds;
if (_whiteFooterView != nil)
if (_whiteFooterView != nil) {
_whiteFooterView.frame = CGRectMake(0.0f, MAX(0.0f, bounds.origin.y), bounds.size.width, bounds.size.height);
else
/*if (self.subviews.firstObject != _whiteFooterView) {
[self insertSubview:_whiteFooterView atIndex:0];
}*/
} else
self.backgroundView.frame = CGRectMake(0.0f, MAX(0.0f, bounds.origin.y), bounds.size.width, bounds.size.height);
if (_hackHeaderSize)
@@ -71,6 +76,13 @@
}
}
- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index {
if (index == 0 && view != _whiteFooterView) {
index = 1;
}
[super insertSubview:view atIndex:index];
}
- (void)didAddSubview:(UIView *)subview
{
[super didAddSubview:subview];

View File

@@ -49,6 +49,9 @@
[super loadView];
_tableView = [[UITableView alloc] initWithFrame:self.view.bounds];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_tableView.alwaysBounceVertical = true;
_tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_tableView.backgroundColor = [UIColor whiteColor];

View File

@@ -55,6 +55,9 @@
[self.view addSubview:_wrapperView];
_collectionView = [[[self _collectionViewClass] alloc] initWithFrame:_wrapperView.bounds collectionViewLayout:[self _collectionLayout]];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_collectionView.alwaysBounceVertical = true;
_collectionView.backgroundColor = [UIColor whiteColor];
_collectionView.delaysContentTouches = true;

View File

@@ -80,6 +80,9 @@
_collectionViewLayout.minimumLineSpacing = 4.0f;
_collectionView = [[TGDraggableCollectionView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height) collectionViewLayout:_collectionViewLayout];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_collectionView.alwaysBounceHorizontal = false;
_collectionView.alwaysBounceVertical = false;
_collectionView.backgroundColor = [UIColor clearColor];

View File

@@ -23,6 +23,9 @@ const CGFloat TGSelectionGestureVerticalFailureThreshold = 5.0f;
if (self != nil)
{
_collectionView = collectionView;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_gestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)];
_gestureRecognizer.delegate = self;

View File

@@ -75,6 +75,9 @@
[self addSubview:_bottomView];
_tableView = [[UITableView alloc] init];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;

View File

@@ -87,6 +87,9 @@
[self addSubview:_tableViewBackground];
_tableView = [[UITableView alloc] init];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;

View File

@@ -324,14 +324,22 @@ static id<TGNavigationBarMusicPlayerProvider> _musicPlayerProvider;
}
}
- (bool)isBackgroundView:(UIView *)view {
NSString *viewClass = NSStringFromClass([view class]);
if ([viewClass isEqualToString:@"_UINavigationBarBackground"] || [viewClass isEqualToString:@"_UIBarBackground"]) {
return true;
}
return false;
}
- (UIView *)findBackground:(UIView *)view
{
if (view == nil)
return nil;
NSString *viewClass = NSStringFromClass([view class]);
if ([viewClass isEqualToString:@"_UINavigationBarBackground"] || [viewClass isEqualToString:@"_UIBarBackground"])
if ([self isBackgroundView:view]) {
return view;
}
for (UIView *subview in view.subviews)
{
@@ -355,8 +363,18 @@ static id<TGNavigationBarMusicPlayerProvider> _musicPlayerProvider;
}
}
- (void)addSubview:(UIView *)view {
if ([self isBackgroundView:view]) {
view.hidden = true;
}
[super addSubview:view];
}
- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index
{
if ([self isBackgroundView:view]) {
view.hidden = true;
}
if (view != self.additionalView)
[super insertSubview:view atIndex:MIN((int)self.subviews.count, MAX(index, 2))];
else

View File

@@ -95,6 +95,12 @@
{
[super loadView];
if (iosMajorVersion() >= 11) {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
self.navigationBar.prefersLargeTitles = false;
#endif
}
if (false && iosMajorVersion() >= 8) {
SEL selector = NSSelectorFromString(TGEncodeText(@"`tdsffoFehfQboHftuvsfSfdphoj{fs", -1));
if ([self respondsToSelector:selector])

View File

@@ -182,6 +182,9 @@ typedef enum {
_collectionLayout = [[TGPhotoStickersCollectionLayout alloc] init];
_collectionView = [[TGPhotoStickersCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:_collectionLayout];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.backgroundColor = [UIColor clearColor];

View File

@@ -53,6 +53,9 @@
_collectionLayout = [[UICollectionViewFlowLayout alloc] init];
_collectionLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, frame.size.width, frame.size.height) collectionViewLayout:_collectionLayout];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#endif
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.backgroundColor = nil;