RRFPSBar icon indicating copy to clipboard operation
RRFPSBar copied to clipboard

nothing show up

Open Chren opened this issue 11 years ago • 12 comments

Only one red line on top of screen, no fps text, no graph line. Am I doing something wrong?

Chren avatar Apr 16 '13 04:04 Chren

could you add screenshot? what branch are you using? What iOS version?

RolandasRazma avatar Apr 16 '13 07:04 RolandasRazma

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

laszlotuss avatar Jan 02 '14 12:01 laszlotuss

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 avatar Jun 17 '14 08:06 AnYuan

@AnYuan maybe the current statusBar is hidened. you can replace [[UIApplication sharedApplication] statusBarFrame]] with CGRectMake(0, 0, CGRectGetWidth([UIScreen mainScreen].bounds), 20) 。

satyso avatar Oct 17 '14 09:10 satyso

Hey guys, you can try my fork, I fix this bug, I will submit a pr later if needed.

VincentSit avatar Feb 27 '15 03:02 VincentSit

hm, @VincentSit why unhidden on init should fix it? @AnYuan and @satyso ideas sounds more plausible. Anyone can replicate this reliable?

RolandasRazma avatar Mar 02 '15 11:03 RolandasRazma

@RolandasRazma I only tested on my device(iPhone 5, iOS 8.1.2). Does not show anything before I modify it.

dc597c6e-1fe0-41bd-9b40-cfdebf08772a

VincentSit avatar Mar 03 '15 06:03 VincentSit

@VincentSit would it be possible for you to build minimal example app where it doesn't work so I could check it out?

RolandasRazma avatar Mar 03 '15 17:03 RolandasRazma

@RolandasRazma Ok, you can download it here.

You may need to comment out line 71:

[self setHidden:NO];

VincentSit avatar Mar 04 '15 02:03 VincentSit

@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.

RolandasRazma avatar Mar 04 '15 09:03 RolandasRazma

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 avatar Mar 04 '15 10:03 VincentSit

@VincentSit thats a good point. I guess it shouldn't be.

RolandasRazma avatar Mar 04 '15 10:03 RolandasRazma