mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-19 20:21:26 +00:00
Support fractional tuning parameters (fixes #112).
This commit is contained in:
parent
ee3aec42a2
commit
38f8e63b01
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// working range buffers, on either side of scroll
|
// working range buffers, on either side of scroll
|
||||||
NSInteger trailingBufferScreenfuls;
|
CGFloat trailingBufferScreenfuls;
|
||||||
NSInteger leadingBufferScreenfuls;
|
CGFloat leadingBufferScreenfuls;
|
||||||
} ASRangeTuningParameters;
|
} ASRangeTuningParameters;
|
||||||
|
|
||||||
@protocol ASRangeControllerDelegate;
|
@protocol ASRangeControllerDelegate;
|
||||||
|
@ -58,8 +58,8 @@ typedef NS_ENUM(NSInteger, ASScrollDirection) {
|
|||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
_tuningParameters = {
|
_tuningParameters = {
|
||||||
.trailingBufferScreenfuls = 1,
|
.trailingBufferScreenfuls = 1.0f,
|
||||||
.leadingBufferScreenfuls = 2,
|
.leadingBufferScreenfuls = 2.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -60,8 +60,8 @@ need to be pruned quickly.
|
|||||||
```objective-c
|
```objective-c
|
||||||
ASRangeController *rangeController = [[ASRangeController alloc] init];
|
ASRangeController *rangeController = [[ASRangeController alloc] init];
|
||||||
rangeController.tuningParameters = (ASRangeTuningParameters){
|
rangeController.tuningParameters = (ASRangeTuningParameters){
|
||||||
.leadingBufferScreenfuls = 2; // two screenfuls in the direction of scroll
|
.leadingBufferScreenfuls = 2.0f; // two screenfuls in the direction of scroll
|
||||||
.trailingBufferScreenfuls = 1; // one screenful in the other direction
|
.trailingBufferScreenfuls = 0.5f; // one-half screenful in the other direction
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user