mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-06 04:32:06 +00:00
Use indexOfObjectIdenticalTo since we only care if the pointers are equal. Thanks @Adlai-Holler!
This commit is contained in:
parent
8081123cb2
commit
b79641d4ee
@ -39,7 +39,7 @@ ASVisibilityDepthImplementation;
|
|||||||
|
|
||||||
- (NSInteger)visibilityDepthOfChildViewController:(UIViewController *)childViewController
|
- (NSInteger)visibilityDepthOfChildViewController:(UIViewController *)childViewController
|
||||||
{
|
{
|
||||||
NSUInteger viewControllerIndex = [self.viewControllers indexOfObject:childViewController];
|
NSUInteger viewControllerIndex = [self.viewControllers indexOfObjectIdenticalTo:childViewController];
|
||||||
if (viewControllerIndex == NSNotFound) {
|
if (viewControllerIndex == NSNotFound) {
|
||||||
//If childViewController is not actually a child, return NSNotFound which is also a really large number.
|
//If childViewController is not actually a child, return NSNotFound which is also a really large number.
|
||||||
return NSNotFound;
|
return NSNotFound;
|
||||||
|
@ -39,7 +39,7 @@ ASVisibilityDepthImplementation;
|
|||||||
|
|
||||||
- (NSInteger)visibilityDepthOfChildViewController:(UIViewController *)childViewController
|
- (NSInteger)visibilityDepthOfChildViewController:(UIViewController *)childViewController
|
||||||
{
|
{
|
||||||
NSUInteger viewControllerIndex = [self.viewControllers indexOfObject:childViewController];
|
NSUInteger viewControllerIndex = [self.viewControllers indexOfObjectIdenticalTo:childViewController];
|
||||||
if (viewControllerIndex == NSNotFound) {
|
if (viewControllerIndex == NSNotFound) {
|
||||||
//If childViewController is not actually a child, return NSNotFound which is also a really large number.
|
//If childViewController is not actually a child, return NSNotFound which is also a really large number.
|
||||||
return NSNotFound;
|
return NSNotFound;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user