mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-04 02:15:47 +00:00
no message
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
@property (nonatomic) bool inhibitDocumentCaptions;
|
||||
@property (nonatomic) bool hasTimer;
|
||||
@property (nonatomic) bool onlyCrop;
|
||||
@property (nonatomic) bool asFile;
|
||||
|
||||
@property (nonatomic, strong) NSArray *underlyingViews;
|
||||
@property (nonatomic, assign) bool openEditor;
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
@property (nonatomic, assign) CGFloat remainingHeight;
|
||||
@property (nonatomic, assign) bool condensed;
|
||||
@property (nonatomic, assign) bool collapsed;
|
||||
|
||||
@property (nonatomic, strong) NSString *recipientName;
|
||||
|
||||
|
||||
@@ -645,6 +645,11 @@ const NSUInteger TGAttachmentDisplayedAssetLimit = 500;
|
||||
|
||||
- (CGFloat)preferredHeightForWidth:(CGFloat)__unused width screenHeight:(CGFloat)screenHeight
|
||||
{
|
||||
if (_collapsed) {
|
||||
self.alpha = 0.0f;
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
CGFloat progress = _zoomingIn ? _zoomingProgress : 1.0f;
|
||||
return [self _preferredHeightForZoomedIn:_zoomedIn progress:progress screenHeight:screenHeight];
|
||||
}
|
||||
@@ -764,7 +769,7 @@ const NSUInteger TGAttachmentDisplayedAssetLimit = 500;
|
||||
if (strongSelf != nil && strongSelf.sendPressed != nil)
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@(!strongSelf->_selectionContext.grouping) forKey:@"TG_mediaGroupingDisabled_v0"];
|
||||
strongSelf.sendPressed(item.asset, false);
|
||||
strongSelf.sendPressed(item.asset, strongSelf.asFile);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -784,7 +789,7 @@ const NSUInteger TGAttachmentDisplayedAssetLimit = 500;
|
||||
if ([cell isKindOfClass:[TGAttachmentAssetCell class]])
|
||||
thumbnailImage = cell.imageView.image;
|
||||
|
||||
TGMediaPickerModernGalleryMixin *mixin = [[TGMediaPickerModernGalleryMixin alloc] initWithContext:_context item:asset fetchResult:_fetchResult parentController:self.parentController thumbnailImage:thumbnailImage selectionContext:_selectionContext editingContext:_editingContext suggestionContext:self.suggestionContext hasCaptions:(_allowCaptions && !_forProfilePhoto) allowCaptionEntities:self.allowCaptionEntities hasTimer:self.hasTimer onlyCrop:self.onlyCrop inhibitDocumentCaptions:_inhibitDocumentCaptions asFile:false itemsLimit:TGAttachmentDisplayedAssetLimit recipientName:self.recipientName];
|
||||
TGMediaPickerModernGalleryMixin *mixin = [[TGMediaPickerModernGalleryMixin alloc] initWithContext:_context item:asset fetchResult:_fetchResult parentController:self.parentController thumbnailImage:thumbnailImage selectionContext:_selectionContext editingContext:_editingContext suggestionContext:self.suggestionContext hasCaptions:(_allowCaptions && !_forProfilePhoto) allowCaptionEntities:self.allowCaptionEntities hasTimer:self.hasTimer onlyCrop:self.onlyCrop inhibitDocumentCaptions:_inhibitDocumentCaptions asFile:self.asFile itemsLimit:TGAttachmentDisplayedAssetLimit recipientName:self.recipientName];
|
||||
|
||||
__weak TGAttachmentCarouselItemView *weakSelf = self;
|
||||
mixin.thumbnailSignalForItem = ^SSignal *(id item)
|
||||
|
||||
@@ -31,6 +31,7 @@ typedef enum {
|
||||
@property (nonatomic, assign) bool allowCaptionEntities;
|
||||
@property (nonatomic, assign) bool allowGrouping;
|
||||
@property (nonatomic, assign) bool inhibitDocumentCaptions;
|
||||
@property (nonatomic, assign) bool inhibitMultipleCapture;
|
||||
@property (nonatomic, assign) bool hasTimer;
|
||||
@property (nonatomic, strong) TGSuggestionContext *suggestionContext;
|
||||
@property (nonatomic, assign) bool shortcut;
|
||||
|
||||
@@ -1227,7 +1227,7 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus
|
||||
}
|
||||
}];
|
||||
|
||||
bool hasCamera = (_intent == TGCameraControllerGenericIntent && !_shortcut) || (_intent == TGCameraControllerPassportMultipleIntent);
|
||||
bool hasCamera = !self.inhibitMultipleCapture && ((_intent == TGCameraControllerGenericIntent && !_shortcut) || (_intent == TGCameraControllerPassportMultipleIntent));
|
||||
TGMediaPickerGalleryModel *model = [[TGMediaPickerGalleryModel alloc] initWithContext:windowContext items:galleryItems focusItem:focusItem selectionContext:_items.count > 1 ? selectionContext : nil editingContext:editingContext hasCaptions:self.allowCaptions allowCaptionEntities:self.allowCaptionEntities hasTimer:self.hasTimer onlyCrop:_intent == TGCameraControllerPassportIntent || _intent == TGCameraControllerPassportIdIntent || _intent == TGCameraControllerPassportMultipleIntent inhibitDocumentCaptions:self.inhibitDocumentCaptions hasSelectionPanel:true hasCamera:hasCamera recipientName:self.recipientName];
|
||||
model.controller = galleryController;
|
||||
model.suggestionContext = self.suggestionContext;
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
[data appendBytes:&length length:4];
|
||||
[data appendData:phoneData];
|
||||
|
||||
NSData *vcardData = [_vcard dataUsingEncoding:NSUTF8StringEncoding];
|
||||
length = (int)vcardData.length;
|
||||
[data appendBytes:&length length:4];
|
||||
[data appendData:vcardData];
|
||||
|
||||
int dataLength = (int)data.length - dataLengthPtr - 4;
|
||||
[data replaceBytesInRange:NSMakeRange(dataLengthPtr, 4) withBytes:&dataLength];
|
||||
}
|
||||
@@ -47,32 +52,47 @@
|
||||
- (TGMediaAttachment *)parseMediaAttachment:(NSInputStream *)is
|
||||
{
|
||||
int dataLength = 0;
|
||||
int read = 0;
|
||||
[is read:(uint8_t *)&dataLength maxLength:4];
|
||||
|
||||
TGContactMediaAttachment *contactAttachment = [[TGContactMediaAttachment alloc] init];
|
||||
|
||||
int uid = 0;
|
||||
[is read:(uint8_t *)&uid maxLength:4];
|
||||
read += 4;
|
||||
contactAttachment.uid = uid;
|
||||
|
||||
int length = 0;
|
||||
[is read:(uint8_t *)&length maxLength:4];
|
||||
uint8_t *firstNameBytes = malloc(length);
|
||||
[is read:firstNameBytes maxLength:length];
|
||||
read += length + 4;
|
||||
contactAttachment.firstName = [[NSString alloc] initWithBytesNoCopy:firstNameBytes length:length encoding:NSUTF8StringEncoding freeWhenDone:true];
|
||||
|
||||
length = 0;
|
||||
[is read:(uint8_t *)&length maxLength:4];
|
||||
uint8_t *lastNameBytes = malloc(length);
|
||||
[is read:lastNameBytes maxLength:length];
|
||||
read += length + 4;
|
||||
contactAttachment.lastName = [[NSString alloc] initWithBytesNoCopy:lastNameBytes length:length encoding:NSUTF8StringEncoding freeWhenDone:true];
|
||||
|
||||
length = 0;
|
||||
[is read:(uint8_t *)&length maxLength:4];
|
||||
uint8_t *phoneBytes = malloc(length);
|
||||
[is read:phoneBytes maxLength:length];
|
||||
read += length + 4;
|
||||
contactAttachment.phoneNumber = [[NSString alloc] initWithBytesNoCopy:phoneBytes length:length encoding:NSUTF8StringEncoding freeWhenDone:true];
|
||||
|
||||
if (read < dataLength)
|
||||
{
|
||||
length = 0;
|
||||
[is read:(uint8_t *)&length maxLength:4];
|
||||
uint8_t *vcardBytes = malloc(length);
|
||||
[is read:vcardBytes maxLength:length];
|
||||
read += length;
|
||||
contactAttachment.vcard = [[NSString alloc] initWithBytesNoCopy:vcardBytes length:length encoding:NSUTF8StringEncoding freeWhenDone:true];
|
||||
}
|
||||
|
||||
return contactAttachment;
|
||||
}
|
||||
|
||||
@@ -84,6 +104,7 @@
|
||||
_firstName = [aDecoder decodeObjectForKey:@"firstName"];
|
||||
_lastName = [aDecoder decodeObjectForKey:@"lastName"];
|
||||
_phoneNumber = [aDecoder decodeObjectForKey:@"phoneNumber"];
|
||||
_vcard = [aDecoder decodeObjectForKey:@"vcard"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -93,6 +114,7 @@
|
||||
[aCoder encodeObject:_firstName forKey:@"firstName"];
|
||||
[aCoder encodeObject:_lastName forKey:@"lastName"];
|
||||
[aCoder encodeObject:_phoneNumber forKey:@"phoneNumber"];
|
||||
[aCoder encodeObject:_vcard forKey:@"vcard"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
@interface TGLocationSignals : NSObject
|
||||
|
||||
+ (SSignal *)geocodeAddress:(NSString *)address;
|
||||
+ (SSignal *)geocodeAddressDictionary:(NSDictionary *)dictionary;
|
||||
|
||||
+ (SSignal *)reverseGeocodeCoordinate:(CLLocationCoordinate2D)coordinate;
|
||||
+ (SSignal *)cityForCoordinate:(CLLocationCoordinate2D)coordinate;
|
||||
+ (SSignal *)driveEta:(CLLocationCoordinate2D)coordinate;
|
||||
|
||||
@@ -78,6 +78,58 @@ NSString *const TGLocationGoogleGeocodeLocale = @"en";
|
||||
|
||||
@implementation TGLocationSignals
|
||||
|
||||
+ (SSignal *)geocodeAddress:(NSString *)address
|
||||
{
|
||||
return [[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
||||
{
|
||||
CLGeocoder *geocoder = [[CLGeocoder alloc] init];
|
||||
[geocoder geocodeAddressString:address completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error)
|
||||
{
|
||||
if (error != nil)
|
||||
{
|
||||
[subscriber putError:error];
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
[subscriber putNext:placemarks.firstObject];
|
||||
[subscriber putCompletion];
|
||||
}
|
||||
}];
|
||||
|
||||
return [[SBlockDisposable alloc] initWithBlock:^
|
||||
{
|
||||
[geocoder cancelGeocode];
|
||||
}];
|
||||
}];
|
||||
}
|
||||
|
||||
+ (SSignal *)geocodeAddressDictionary:(NSDictionary *)dictionary
|
||||
{
|
||||
return [[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
||||
{
|
||||
CLGeocoder *geocoder = [[CLGeocoder alloc] init];
|
||||
[geocoder geocodeAddressDictionary:dictionary completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error)
|
||||
{
|
||||
if (error != nil)
|
||||
{
|
||||
[subscriber putError:error];
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
[subscriber putNext:placemarks.firstObject];
|
||||
[subscriber putCompletion];
|
||||
}
|
||||
}];
|
||||
|
||||
return [[SBlockDisposable alloc] initWithBlock:^
|
||||
{
|
||||
[geocoder cancelGeocode];
|
||||
}];
|
||||
}];
|
||||
}
|
||||
|
||||
+ (SSignal *)reverseGeocodeCoordinate:(CLLocationCoordinate2D)coordinate
|
||||
{
|
||||
NSURL *url = [NSURL URLWithString:[[NSString alloc] initWithFormat:@"https://maps.googleapis.com/maps/api/geocode/json?latlng=%f,%f&sensor=true&language=%@", coordinate.latitude, coordinate.longitude, TGLocationGoogleGeocodeLocale]];
|
||||
|
||||
@@ -49,7 +49,6 @@ typedef enum
|
||||
@property (nonatomic, assign) bool allowCaptionEntities;
|
||||
@property (nonatomic, assign) bool inhibitDocumentCaptions;
|
||||
@property (nonatomic, assign) bool shouldStoreAssets;
|
||||
|
||||
@property (nonatomic, assign) bool hasTimer;
|
||||
@property (nonatomic, assign) bool onlyCrop;
|
||||
|
||||
@@ -77,6 +76,7 @@ typedef enum
|
||||
- (void)completeWithCurrentItem:(TGMediaAsset *)currentItem;
|
||||
|
||||
+ (instancetype)controllerWithContext:(id<LegacyComponentsContext>)context assetGroup:(TGMediaAssetGroup *)assetGroup intent:(TGMediaAssetsControllerIntent)intent recipientName:(NSString *)recipientName saveEditedPhotos:(bool)saveEditedPhotos allowGrouping:(bool)allowGrouping;
|
||||
+ (instancetype)controllerWithContext:(id<LegacyComponentsContext>)context assetGroup:(TGMediaAssetGroup *)assetGroup intent:(TGMediaAssetsControllerIntent)intent recipientName:(NSString *)recipientName saveEditedPhotos:(bool)saveEditedPhotos allowGrouping:(bool)allowGrouping inhibitSelection:(bool)inhibitSelection;
|
||||
|
||||
+ (TGMediaAssetType)assetTypeForIntent:(TGMediaAssetsControllerIntent)intent;
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@
|
||||
@implementation TGMediaAssetsController
|
||||
|
||||
+ (instancetype)controllerWithContext:(id<LegacyComponentsContext>)context assetGroup:(TGMediaAssetGroup *)assetGroup intent:(TGMediaAssetsControllerIntent)intent recipientName:(NSString *)recipientName saveEditedPhotos:(bool)saveEditedPhotos allowGrouping:(bool)allowGrouping
|
||||
{
|
||||
return [self controllerWithContext:context assetGroup:assetGroup intent:intent recipientName:recipientName saveEditedPhotos:saveEditedPhotos allowGrouping:allowGrouping inhibitSelection:false];
|
||||
}
|
||||
|
||||
+ (instancetype)controllerWithContext:(id<LegacyComponentsContext>)context assetGroup:(TGMediaAssetGroup *)assetGroup intent:(TGMediaAssetsControllerIntent)intent recipientName:(NSString *)recipientName saveEditedPhotos:(bool)saveEditedPhotos allowGrouping:(bool)allowGrouping inhibitSelection:(bool)inhibitSelection
|
||||
{
|
||||
if (intent != TGMediaAssetsControllerSendMediaIntent)
|
||||
allowGrouping = false;
|
||||
@@ -104,13 +109,9 @@
|
||||
|
||||
if ([group isKindOfClass:[TGMediaAssetGroup class]])
|
||||
{
|
||||
pickerController = [[TGMediaAssetsPickerController alloc] initWithContext:strongController->_context assetsLibrary:strongController.assetsLibrary assetGroup:group intent:intent selectionContext:strongController->_selectionContext editingContext:strongController->_editingContext saveEditedPhotos:strongController->_saveEditedPhotos];
|
||||
pickerController = [[TGMediaAssetsPickerController alloc] initWithContext:strongController->_context assetsLibrary:strongController.assetsLibrary assetGroup:group intent:intent selectionContext:inhibitSelection ? nil : strongController->_selectionContext editingContext:strongController->_editingContext saveEditedPhotos:strongController->_saveEditedPhotos];
|
||||
pickerController.pallete = strongController.pallete;
|
||||
}
|
||||
else if ([group isKindOfClass:[TGMediaAssetMomentList class]])
|
||||
{
|
||||
pickerController = [[TGMediaAssetsMomentsController alloc] initWithContext:strongController->_context assetsLibrary:strongController.assetsLibrary momentList:group intent:intent selectionContext:strongController->_selectionContext editingContext:strongController->_editingContext saveEditedPhotos:strongController->_saveEditedPhotos];
|
||||
}
|
||||
pickerController.suggestionContext = strongController.suggestionContext;
|
||||
pickerController.localMediaCacheEnabled = strongController.localMediaCacheEnabled;
|
||||
pickerController.captionsEnabled = strongController.captionsEnabled;
|
||||
@@ -125,7 +126,7 @@
|
||||
};
|
||||
[groupsController loadViewIfNeeded];
|
||||
|
||||
TGMediaAssetsPickerController *pickerController = [[TGMediaAssetsPickerController alloc] initWithContext:context assetsLibrary:assetsController.assetsLibrary assetGroup:assetGroup intent:intent selectionContext:assetsController->_selectionContext editingContext:assetsController->_editingContext saveEditedPhotos:saveEditedPhotos];
|
||||
TGMediaAssetsPickerController *pickerController = [[TGMediaAssetsPickerController alloc] initWithContext:context assetsLibrary:assetsController.assetsLibrary assetGroup:assetGroup intent:intent selectionContext:inhibitSelection ? nil : assetsController->_selectionContext editingContext:assetsController->_editingContext saveEditedPhotos:saveEditedPhotos];
|
||||
pickerController.pallete = assetsController.pallete;
|
||||
pickerController.catchToolbarView = catchToolbarView;
|
||||
|
||||
@@ -353,7 +354,7 @@
|
||||
_toolbarView.pallete = _pallete;
|
||||
_toolbarView.safeAreaInset = [TGViewController safeAreaInsetForOrientation:self.interfaceOrientation];
|
||||
_toolbarView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
|
||||
if (_intent != TGMediaAssetsControllerSendFileIntent && _intent != TGMediaAssetsControllerSendMediaIntent)
|
||||
if ((_intent != TGMediaAssetsControllerSendFileIntent && _intent != TGMediaAssetsControllerSendMediaIntent) || _selectionContext == nil)
|
||||
[_toolbarView setRightButtonHidden:true];
|
||||
if (_selectionContext.allowGrouping)
|
||||
{
|
||||
@@ -519,7 +520,7 @@
|
||||
if (selectedItems.count == 0 && currentItem != nil)
|
||||
[selectedItems addObject:currentItem];
|
||||
|
||||
if (saveEditedPhotos && storeAssets)
|
||||
if (saveEditedPhotos && storeAssets && editingContext != nil)
|
||||
{
|
||||
NSMutableArray *fullSizeSignals = [[NSMutableArray alloc] init];
|
||||
for (TGMediaAsset *asset in selectedItems)
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
- (SSignal *)captionSignalForItem:(NSObject<TGMediaEditableItem> *)item;
|
||||
- (void)setCaption:(NSString *)caption entities:(NSArray *)entities forItem:(NSObject<TGMediaEditableItem> *)item;
|
||||
|
||||
- (void)setForcedCaption:(NSString *)caption entities:(NSArray *)entities;
|
||||
|
||||
- (NSObject<TGMediaEditAdjustments> *)adjustmentsForItem:(NSObject<TGMediaEditableItem> *)item;
|
||||
- (SSignal *)adjustmentsSignalForItem:(NSObject<TGMediaEditableItem> *)item;
|
||||
- (void)setAdjustments:(NSObject<TGMediaEditAdjustments> *)adjustments forItem:(NSObject<TGMediaEditableItem> *)item;
|
||||
|
||||
@@ -99,6 +99,9 @@
|
||||
SPipe *_timerPipe;
|
||||
SPipe *_fullSizePipe;
|
||||
SPipe *_cropPipe;
|
||||
|
||||
NSString *_forcedCaption;
|
||||
NSArray *_forcedEntities;
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -338,6 +341,9 @@
|
||||
|
||||
- (NSString *)captionForItem:(id<TGMediaEditableItem>)item
|
||||
{
|
||||
if (_forcedCaption != nil)
|
||||
return _forcedCaption;
|
||||
|
||||
NSString *itemId = [self _contextualIdForItemId:item.uniqueIdentifier];
|
||||
if (itemId == nil)
|
||||
return nil;
|
||||
@@ -347,6 +353,9 @@
|
||||
|
||||
- (NSArray *)entitiesForItem:(NSObject<TGMediaEditableItem> *)item
|
||||
{
|
||||
if (_forcedCaption != nil)
|
||||
return _forcedEntities;
|
||||
|
||||
NSString *itemId = [self _contextualIdForItemId:item.uniqueIdentifier];
|
||||
if (itemId == nil)
|
||||
return nil;
|
||||
@@ -356,6 +365,14 @@
|
||||
|
||||
- (void)setCaption:(NSString *)caption entities:(NSArray *)entities forItem:(id<TGMediaEditableItem>)item
|
||||
{
|
||||
if (_forcedCaption != nil)
|
||||
{
|
||||
_forcedCaption = caption;
|
||||
_forcedEntities = entities;
|
||||
_captionPipe.sink([TGMediaCaptionUpdate captionUpdateWithItem:item caption:caption entities:entities]);
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *itemId = [self _contextualIdForItemId:item.uniqueIdentifier];
|
||||
if (itemId == nil)
|
||||
return;
|
||||
@@ -373,6 +390,12 @@
|
||||
_captionPipe.sink([TGMediaCaptionUpdate captionUpdateWithItem:item caption:caption entities:entities]);
|
||||
}
|
||||
|
||||
- (void)setForcedCaption:(NSString *)caption entities:(NSArray *)entities
|
||||
{
|
||||
_forcedCaption = caption;
|
||||
_forcedEntities = entities;
|
||||
}
|
||||
|
||||
- (SSignal *)captionSignalForItem:(NSObject<TGMediaEditableItem> *)item
|
||||
{
|
||||
NSString *uniqueIdentifier = item.uniqueIdentifier;
|
||||
|
||||
@@ -22,6 +22,7 @@ typedef enum
|
||||
|
||||
- (instancetype)initWithTitle:(NSString *)title type:(TGMenuSheetButtonType)type action:(void (^)(void))action;
|
||||
|
||||
@property (nonatomic, assign) bool collapsed;
|
||||
- (void)setCollapsed:(bool)collapsed animated:(bool)animated;
|
||||
|
||||
@end
|
||||
|
||||
@@ -13,7 +13,6 @@ const CGFloat TGMenuSheetButtonItemViewHeight = 57.0f;
|
||||
|
||||
@interface TGMenuSheetButtonItemView ()
|
||||
{
|
||||
bool _collapsed;
|
||||
bool _dark;
|
||||
bool _requiresDivider;
|
||||
|
||||
@@ -36,6 +35,8 @@ const CGFloat TGMenuSheetButtonItemViewHeight = 57.0f;
|
||||
_button.exclusiveTouch = true;
|
||||
_button.highlightBackgroundColor = UIColorRGB(0xebebeb);
|
||||
[self _updateForType:type];
|
||||
_button.titleLabel.adjustsFontSizeToFitWidth = true;
|
||||
_button.titleLabel.minimumScaleFactor = 0.7f;
|
||||
[_button setTitle:title forState:UIControlStateNormal];
|
||||
[_button addTarget:self action:@selector(buttonPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:_button];
|
||||
|
||||
@@ -139,6 +139,11 @@
|
||||
_backgroundView.frame = CGRectMake(x, 2.0f - backgroundOffset + (_forceArrowOnTop ? 7.0f : 0.0f), backgroundWidth, 36.0f + backgroundOffset);
|
||||
_textLabel.frame = CGRectMake(_backgroundView.frame.origin.x + inset, 12.0f - TGScreenPixel - backgroundOffset + (_forceArrowOnTop ? 7.0f : 0.0f), labelWidth, _textLabel.frame.size.height);
|
||||
|
||||
if (_forceArrowOnTop)
|
||||
{
|
||||
_arrowView.frame = CGRectMake(_arrowView.frame.origin.x, _backgroundView.frame.origin.y - _arrowView.frame.size.height, _arrowView.frame.size.width, _arrowView.frame.size.height);
|
||||
}
|
||||
|
||||
self.transform = transform;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user