RRFPSBar
RRFPSBar copied to clipboard
nothing show up
Only one red line on top of screen, no fps text, no graph line. Am I doing something wrong?
could you add screenshot? what branch are you using? What iOS version?
I tried this in iOS 5.1, 6.0 and 7.0.2 but no luck, just a red line showing up. Also it is makes an iPhone 3Gs extremely slow and even crashing because it gets a NaN value there: y = MAX(0.0f, MIN(_chartLayer.frame.size.height, y)); [path addLineToPoint:CGPointMake(i +1.0f, y)]; // y is 0 or NaN
I got the same problem as Chren's. Then I found out that because of [[UIApplication sharedApplication] statusBarFrame]] is (0,0,0,0) and self.bounds is (0,0,0,0). But I still do not know why that happened. Using master branch, iOS 7.0.2
@AnYuan maybe the current statusBar is hidened. you can replace [[UIApplication sharedApplication] statusBarFrame]] with CGRectMake(0, 0, CGRectGetWidth([UIScreen mainScreen].bounds), 20) 。
Hey guys, you can try my fork, I fix this bug, I will submit a pr later if needed.
hm, @VincentSit why unhidden on init should fix it? @AnYuan and @satyso ideas sounds more plausible. Anyone can replicate this reliable?
@RolandasRazma I only tested on my device(iPhone 5, iOS 8.1.2). Does not show anything before I modify it.
@VincentSit would it be possible for you to build minimal example app where it doesn't work so I could check it out?
@RolandasRazma Ok, you can download it here.
You may need to comment out line 71:
[self setHidden:NO];
@VincentSit thanks for app.
You are right about -[UIWindow setHidden:]
. If you check readme
it states that you have to do [[RRFPSBar sharedInstance] setHidden:NO];
in -application:didFinishLaunchingWithOptions:
wonder if thats the confusion everyone having or there is another problem.
I'm sorry I did not carefully read the README
. So, in my device does not have this problem.
But there is another question, why _displayLink
still running when [[RRFPSBar sharedInstance] setHidden:YES];
?
@VincentSit thats a good point. I guess it shouldn't be.