-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progress HUD not shown: iOS 8 #29
Comments
Hello @foffux, can you show me the |
here also.. i've implemented it on a other uiview loaded at runtime. when i init kvn it says 'Unable to simultaneously satisfy constraints.' ... maybe you should do a version without autolayout? if something is not so correct it messes up all the things and kvn wont show up. |
Hello Kevin. KVNProgressConfiguration is really a basic one: - (KVNProgressConfiguration *)customKVNProgressUIConfiguration:(NSInteger)deviceScreenSize
{
KVNProgressConfiguration *configuration = [[KVNProgressConfiguration alloc] init];
CGFloat circleSize;
CGFloat statusFont;
CGFloat lineWidth;
if (deviceScreenSize == SCREEN_SIZE_IPAD_CLASSIC) {
circleSize = 220.0f;
statusFont = 30.0f;
lineWidth = 2.0f;
} else {
circleSize = 110.0f;
statusFont = 15.0f;
lineWidth = 1.0f;
}
// See the documentation of KVNProgressConfiguration
configuration.statusColor = [UIColor whiteColor];
configuration.statusFont = [UIFont fontWithName:@"Play-Bold" size:statusFont];
configuration.circleStrokeForegroundColor = [UIColor whiteColor];
configuration.circleStrokeBackgroundColor = [UIColor colorWithWhite:1.0f alpha:0.3f];
configuration.circleFillBackgroundColor = [UIColor colorWithWhite:1.0f alpha:0.1f];
configuration.backgroundFillColor = [UIColor colorWithRed:0.173f green:0.263f blue:0.856f alpha:0.9f];
configuration.backgroundTintColor = [UIColor colorWithRed:43/255.0f green:183/255.0f blue:185/255.0f alpha:1.0f];
configuration.successColor = [UIColor whiteColor];
configuration.errorColor = [UIColor whiteColor];
configuration.circleSize = circleSize;
configuration.lineWidth = lineWidth;
return configuration;
} Also for me: maybe you should do a version without auto layout? Or at least think about it? Thank you very much. |
HA! its magic! ok. |
Hello @justvanbloom, what did you do to make this issue go away? Thanks for the enlightenment! |
I do not think it is due to Xcode 6.3 beta because I am not using it but 2015-02-18 8:50 GMT+01:00 Kevin Hirsch [email protected]:
|
So do we agree on closing this issue? |
If I was you I would wait. Let me try that Masonry pod. Then I will tell 2015-02-18 9:02 GMT+01:00 Kevin Hirsch [email protected]:
|
Okay, I wait for your review then, thanks a lot ! 👍 |
hello @justvanbloom: could you please let us know how to use masonry pod tougher with KVNProgress? |
Ok. So ist easy. Make a broken autolayout element in storyboard, after this view is displayed, kvn wont show normally. I'll make a pull these days. Just for be sure :) |
Ok I will wait for your pull then to see if this issue had been solved. Il mercoledì 18 febbraio 2015, JustVanBlooM <[email protected]
|
You mean you'll make a pull of last Masonry commits to be sure this issue is fixed? |
Hello guys. |
@foffux: |
I will try to reproduce it. |
any news on this? |
Here I am. What I can see testing it directly in my reals device, but just with iOS 8, 2015-02-23 14:00:02.999 Angel[346:34741] Unable to simultaneously satisfy
(
) *Will attempt to recover by breaking constraint * <NSLayoutConstraint:0x174487210 H:[UILabel:0x1356938b0'Loading...']-(20)-| Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to The methods in the UIConstraintBasedLayoutDebugging category on UIView 2015-02-23 14:00:03.000 Angel[346:34741] Unable to simultaneously satisfy
(
) *Will attempt to recover by breaking constraint * <NSLayoutConstraint:0x174487990 H:[UIImageView:0x1741fcd00(-50)]> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to The methods in the UIConstraintBasedLayoutDebugging category on UIView I hope this can help to understand how to fix this problem. Let me know. 2015-02-23 10:32 GMT+01:00 JustVanBlooM [email protected]:
|
Yep. Exactly this is it. So it seems autolayout is broken.. @kevin ? |
Sorry for yesterday. I wasn't available. |
Hello guys: |
Thank you for the details! I will check that tonight (GMT+1) ;) |
Okay, have a nice chase... :-) |
Thanks! |
Great! i will also use this controller for a few projects. Ofc including Acknowledgments in AppSettings / info! |
It seems that there is a problem coming from the width constraint on the contentView:
It shouldn't be -50. It should be a positive number. I was not able to reproduce the bug using Simulator iPhone 5 and 6 on iOS 8.1 and my own iPhone 6 device on iOS 8.1.3 using Xcode 6.1.1 (6A2008a). I tested all orientations also. @foffux, can you precise some things for me, please:
Thanks for the details. |
Xcode Version 6.1.1 (6A2008a) Same :) ok. so its just this? |
Xcode: same version you used if I ma not wrong. I have to check. Pay attention: it does not happen every time. But when happens then it won't show anymore. Question: if you think problem is what you highlighted, give me a debug version with traces on, I will test it for you. Okay? Thanks Inviato da iPhone
|
why this? before i have a broken constraint added to uiview.. and if its there it wont show. |
so the fix is:
|
Will attempt to recover by breaking constraint <NSLayoutConstraint:0x1742896f0 UILabel:0x13fd12b80.width == 217> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful. 2015-02-28 19:45:15.220 beta1[493:71552] -[MasterViewController hideSettingsView] [Line 3176] hide 2015-02-28 19:45:15.473 beta1[493:71552] __40-[MasterViewController hideSettingsView]_block_invoke1563 [Line 3191] Animation finished 2015-02-28 19:45:19.942 beta1[493:71552] -[MasterViewController icloudsync:] [Line 3298] icloud sync 2015-02-28 19:45:19.956 beta1[493:71552] ===== SHOWING HUD 2015-02-28 19:45:19.958 beta1[493:71552] ===== ADDING TO SUPERVIEW: <UIWindow: 0x13fe0b2b0; frame = (0 0; 414 736); autoresize = W+H; gestureRecognizers = <NSArray: 0x17024b880>; layer = <UIWindowLayer: 0x170220f20>> 2015-02-28 19:45:19.958 beta1[493:71552] = superview bounds: {{0, 0}, {413.99999999999994, 736.00000000000011}} 2015-02-28 19:45:19.965 beta1[493:71552] ===== FINISH ADDING TO SUPERVIEW: <UIWindow: 0x13fe0b2b0; frame = (0 0; 414 736); autoresize = W+H; gestureRecognizers = <NSArray: 0x17024b880>; layer = <UIWindowLayer: 0x170220f20>> 2015-02-28 19:45:19.966 beta1[493:71552] ==== SETTING UI 2015-02-28 19:45:19.966 beta1[493:71552] ===== SETTING BASE CONSTRAINTS 2015-02-28 19:45:19.967 beta1[493:71552] = bounds: {{0, 0}, {413.99999999999994, 736.00000000000011}} |
Hello guys |
@foffux: temporally fix: search -(void)addToView Insert fix -(void)addToView:(UIView *)superview |
Okay thank you I will try as soon as I will come back home. Should this fix the issue? Have you already try it? |
Jep. This fixed it. |
@justvanbloom: when adding the full screen HUD, it is calling: - (void)addToCurrentWindow
{
UIWindow *currentWindow = nil;
NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator];
for (UIWindow *window in frontToBackWindows) {
if (window.windowLevel == UIWindowLevelNormal) {
currentWindow = window;
break;
}
}
if (self.superview != currentWindow) {
[self addToView:currentWindow];
}
} So changing the way to get the current window to yours should resolve the problem: - (void)addToCurrentWindow
{
UIWindow *currentWindow = [UIApplication sharedApplication].keyWindow;
if (!currentWindow) {
NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator];
for (UIWindow *window in frontToBackWindows) {
if (window.windowLevel == UIWindowLevelNormal) {
currentWindow = window;
break;
}
}
}
if (self.superview != currentWindow) {
[self addToView:currentWindow];
}
} Do you agree? Can I make a new commit with these modifications so you can check that everything works correctly? |
ah! yep. but to get top window on superview i call let me know |
I think doing the for through all windows is better instead of |
[[UIApplication sharedApplication].windows objectAtIndex:0] is topview.. ok wayne! both works! great. (close?) |
Great! |
Hello Inviato da iPhone
|
@foffux: You just have to pull the |
Hello // Fix for non autolayout project
self.frame = superview.bounds; I can see everything is okay. Tomorrow I will make some other tests. But could you please explain me the latest fix (6139b95) and think about what I told about other view shown (alert, ADS), and also think about do not commit fix 6139b95 but just the line of code I highlighted above? P.S. |
Hello @foffux, You are right, I think that displaying @justvanbloom: I'm wondering, where do you call KVNProgress in your code? How is it possible that NSEnumerator *frontToBackWindows = [[[UIApplication sharedApplication] windows] reverseObjectEnumerator];
for (UIWindow *window in frontToBackWindows) {
if (window.windowLevel == UIWindowLevelNormal) {
currentWindow = window;
break;
}
} is not working for you and that your logs prints What I have in the log looks like this: |
Hello Kevin. 2015-03-04 23:30 GMT+01:00 Kevin Hirsch [email protected]:
|
@foffux, what I am saying is that I think I should undo commit 6139b95 because it is indeed messing with alert views but I want to be sure to resolve @justvanbloom's problem who needs commit 6139b95. @justvanbloom, any news for my comment above? |
Ah okay kevin. But then, we have not solved the main problem yet because even if I told you with just the fix related to setting bounds it è was disappeared, in fact this is not true because unfortunately I can see the same issue with the same debug traces dispyed. So do we need to restart the chase? Inviato da iPhone
|
Well, besides my fix worked for fullscreen. I'll make later a fix for controller in uiview as kevin mentioned my pull request wont fix this. Von meinem iPhone gesendet
|
@foffux: If you still have the problem, can you put here the logs you have in your console please? |
Hello Kevin. invisible-hud are good because now I can see HUD in almost every scenarios with good logs. Take a look below: 2015-03-16 12:00:10.917 Angel[3432:116073] ===== SHOWING HUD
2015-03-16 12:00:10.918 Angel[3432:116073] ===== ADDING TO SUPERVIEW: <UIWindow: 0x7a76d600; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0x7a76de10>; layer = <UIWindowLayer: 0x7a76d7b0>>
2015-03-16 12:00:10.918 Angel[3432:116073] = superview bounds: {{0, 0}, {320, 480}}
2015-03-16 12:00:10.919 Angel[3432:116073] ===== FINISH ADDING TO SUPERVIEW: <UIWindow: 0x7a76d600; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0x7a76de10>; layer = <UIWindowLayer: 0x7a76d7b0>>
2015-03-16 12:00:10.920 Angel[3432:116073] ==== SETTING UI
2015-03-16 12:00:10.920 Angel[3432:116073] ===== SETTING BASE CONSTRAINTS
2015-03-16 12:00:10.920 Angel[3432:116073] = bounds: {{0, 0}, {320, 480}}
2015-03-16 12:00:10.920 Angel[3432:116073] = statusInset: 10.000000
2015-03-16 12:00:10.920 Angel[3432:116073] = fullScreen: 0
2015-03-16 12:00:10.921 Angel[3432:116073] = contentWidth: 270.000000
2015-03-16 12:00:10.921 Angel[3432:116073] ===== FINISH SETTING BASE CONSTRAINTS
2015-03-16 12:00:11.084 Angel[3432:116073] ===== UPDATING BACKGROUND CONSTRAINTS
2015-03-16 12:00:11.084 Angel[3432:116073] = fullScreen: 0
2015-03-16 12:00:11.085 Angel[3432:116073] = status: Lotteria...
2015-03-16 12:00:11.085 Angel[3432:116073] = contentViewWidth: 270.000000
2015-03-16 12:00:11.085 Angel[3432:116073] ===== FINISH UPDATING BACKGROUND CONSTRAINTS
2015-03-16 12:00:11.085 Angel[3432:116073] ==== FINISH SETTING UI
2015-03-16 12:00:11.085 Angel[3432:116073] ===== FINISH SHOWING HUD
2015-03-16 12:00:11.086 Angel[3432:116073] sendingDataToServer
2015-03-16 12:00:11.545 Angel[3432:116073] ===== SHOWING HUD
2015-03-16 12:00:11.856 Angel[3432:116073] ===== SHOWING HUD
2015-03-16 12:00:11.856 Angel[3432:116073] ==== SETTING UI
2015-03-16 12:00:11.857 Angel[3432:116073] ===== SETTING BASE CONSTRAINTS
2015-03-16 12:00:11.857 Angel[3432:116073] = bounds: {{0, 0}, {320, 480}}
2015-03-16 12:00:11.857 Angel[3432:116073] = statusInset: 10.000000
2015-03-16 12:00:11.857 Angel[3432:116073] = fullScreen: 0
2015-03-16 12:00:11.858 Angel[3432:116073] = contentWidth: 270.000000
2015-03-16 12:00:11.858 Angel[3432:116073] ===== FINISH SETTING BASE CONSTRAINTS
2015-03-16 12:00:11.859 Angel[3432:116073] ==== FINISH SETTING UI
2015-03-16 12:00:11.860 Angel[3432:116073] ===== FINISH SHOWING HUD
2015-03-16 12:00:14.039 Angel[3432:116073] ==== DISMISSING HUD
2015-03-16 12:00:14.444 Angel[3432:116073] ==== FINISH DISMISSING HUD There is just a scenario where I can see problems, but I do not think related to same issue. This scenario is when I launch HUD after tapping an alert button. In this scenario the bad thing is that the HUD suddenly disappear before it had to. But also in this case your logs are good, take a look (iOS 8): 2015-03-16 12:06:06.095 Angel[4795:151930] ===== SHOWING HUD
2015-03-16 12:06:10.165 Angel[4795:151930] ===== ADDING TO SUPERVIEW: <_UIAlertControllerShimPresenterWindow: 0x7c98d6a0; frame = (0 0; 320 480); opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x7c9c3d30>; layer = <UIWindowLayer: 0x78f0c950>>
2015-03-16 12:06:10.166 Angel[4795:151930] = superview bounds: {{0, 0}, {320, 480}}
2015-03-16 12:06:10.167 Angel[4795:151930] ===== FINISH ADDING TO SUPERVIEW: <_UIAlertControllerShimPresenterWindow: 0x7c98d6a0; frame = (0 0; 320 480); opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x7c9c3d30>; layer = <UIWindowLayer: 0x78f0c950>>
2015-03-16 12:06:10.167 Angel[4795:151930] ==== SETTING UI
2015-03-16 12:06:10.168 Angel[4795:151930] ===== SETTING BASE CONSTRAINTS
2015-03-16 12:06:10.168 Angel[4795:151930] = bounds: {{0, 0}, {320, 480}}
2015-03-16 12:06:10.168 Angel[4795:151930] = statusInset: 10.000000
2015-03-16 12:06:10.168 Angel[4795:151930] = fullScreen: 0
2015-03-16 12:06:10.168 Angel[4795:151930] = contentWidth: 270.000000
2015-03-16 12:06:10.169 Angel[4795:151930] ===== FINISH SETTING BASE CONSTRAINTS
2015-03-16 12:06:10.294 Angel[4795:151930] ===== UPDATING BACKGROUND CONSTRAINTS
2015-03-16 12:06:10.294 Angel[4795:151930] = fullScreen: 0
2015-03-16 12:06:10.294 Angel[4795:151930] = status: Lotteria...
2015-03-16 12:06:10.295 Angel[4795:151930] = contentViewWidth: 270.000000
2015-03-16 12:06:10.295 Angel[4795:151930] ===== FINISH UPDATING BACKGROUND CONSTRAINTS
2015-03-16 12:06:10.295 Angel[4795:151930] ==== FINISH SETTING UI
2015-03-16 12:06:10.295 Angel[4795:151930] ===== FINISH SHOWING HUD
2015-03-16 12:06:10.295 Angel[4795:151930] sendingDataToServer
2015-03-16 12:06:10.746 Angel[4795:151930] ===== SHOWING HUD
2015-03-16 12:06:11.073 Angel[4795:151930] ===== SHOWING HUD
2015-03-16 12:06:11.074 Angel[4795:151930] ==== SETTING UI
2015-03-16 12:06:11.074 Angel[4795:151930] ===== SETTING BASE CONSTRAINTS
2015-03-16 12:06:11.074 Angel[4795:151930] = bounds: {{0, 0}, {320, 480}}
2015-03-16 12:06:11.074 Angel[4795:151930] = statusInset: 10.000000
2015-03-16 12:06:11.075 Angel[4795:151930] = fullScreen: 0
2015-03-16 12:06:11.075 Angel[4795:151930] = contentWidth: 270.000000
2015-03-16 12:06:11.075 Angel[4795:151930] ===== FINISH SETTING BASE CONSTRAINTS
2015-03-16 12:06:11.075 Angel[4795:151930] ==== FINISH SETTING UI
2015-03-16 12:06:11.076 Angel[4795:151930] ===== FINISH SHOWING HUD
2015-03-16 12:06:13.275 Angel[4795:151930] ==== DISMISSING HUD
2015-03-16 12:06:13.677 Angel[4795:151930] ==== FINISH DISMISSING HUD In iOS 7, instead: 2015-03-16 12:00:09.272 Angel[5146:60b] ===== SHOWING HUD
2015-03-16 12:00:09.273 Angel[5146:60b] ===== ADDING TO SUPERVIEW: <_UIModalItemHostingWindow: 0x7b6de790; frame = (0 0; 320 480); gestureRecognizers = <NSArray: 0x7b6dec90>; layer = <UIWindowLayer: 0x7b6de910>>
2015-03-16 12:00:09.273 Angel[5146:60b] = superview bounds: {{0, 0}, {320, 480}}
2015-03-16 12:00:09.276 Angel[5146:60b] ===== FINISH ADDING TO SUPERVIEW: <_UIModalItemHostingWindow: 0x7b6de790; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0x7b6dec90>; layer = <UIWindowLayer: 0x7b6de910>>
2015-03-16 12:00:09.277 Angel[5146:60b] ==== SETTING UI
2015-03-16 12:00:09.277 Angel[5146:60b] ===== SETTING BASE CONSTRAINTS
2015-03-16 12:00:09.278 Angel[5146:60b] = bounds: {{0, 0}, {320, 480}}
2015-03-16 12:00:09.278 Angel[5146:60b] = statusInset: 10.000000
2015-03-16 12:00:09.279 Angel[5146:60b] = fullScreen: 0
2015-03-16 12:00:09.279 Angel[5146:60b] = contentWidth: 270.000000
2015-03-16 12:00:09.279 Angel[5146:60b] ===== FINISH SETTING BASE CONSTRAINTS
2015-03-16 12:00:09.361 Angel[5146:60b] ===== UPDATING BACKGROUND CONSTRAINTS
2015-03-16 12:00:09.361 Angel[5146:60b] = fullScreen: 0
2015-03-16 12:00:09.362 Angel[5146:60b] = status: Lotteria...
2015-03-16 12:00:09.362 Angel[5146:60b] = contentViewWidth: 270.000000
2015-03-16 12:00:09.362 Angel[5146:60b] ===== FINISH UPDATING BACKGROUND CONSTRAINTS
2015-03-16 12:00:09.362 Angel[5146:60b] ==== FINISH SETTING UI
2015-03-16 12:00:09.362 Angel[5146:60b] ===== FINISH SHOWING HUD
2015-03-16 12:00:09.363 Angel[5146:60b] sendingDataToServer
2015-03-16 12:00:12.995 Angel[5146:60b] MOPUB: MoPub HTML banner did load
2015-03-16 12:00:13.053 Angel[5146:60b] ===== SHOWING HUD I do not see anything wrong. Do you agree? I thought it could be caused by the fact that I was not updated my alert view to new alert view controller, but it happened also in iOS 7... In my opinion, you could merge what you did in the master (also with my pull request) and from that, we can start to analyze also this problem. Certainly, latest code is much more usable than before and even if there is this kind of problem is not a big issue, at least at the moment. This is what I think. |
@foffux, everything seems great except for the window the
and on iOS 7:
Do you have the same logs with the same windows without code from commit 6139b95? Also, when are you calling |
Yes yes yes yes Inviato da iPhone Il giorno 06/mar/2015, alle ore 18:46, Kevin Hirsch < @foffux https://github.com/foffux, everything seems great except for the _UIAlertControllerShimPresenterWindow and on iOS 7: _UIModalItemHostingWindow Do you have the same logs with the same windows without code from commit Also, when are you calling KVNProgress after a UIAlertView: — |
@foffux: Great! I'm glad it fixes your problem :) You are talking about your old pull request, which one is it and what do you want me to do? |
Okay perfect. I will be waiting for it. Inviato da iPad
|
Yes I have merged it already, good idea by the way! 👍 |
Hello
Unfortunately I found out a regression in the progress HUD. Everything is working fine under iOS 7, but under iOS 8 I cannot see the progress HUD displayed and what I get in my output window is:
2015-02-26 12:00:09.407 Angel[6336:100953] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x792c4740 H:[UIImageView:0x792cf380(-50)]>",
"<NSLayoutConstraint:0x792d6890 H:[UILabel:0x792c8480'Loading...']-(20)-| (Names: '|':UIImageView:0x792cf380 )>",
"<NSLayoutConstraint:0x792df990 H:|-(20)-[UILabel:0x792c8480'Loading...'] (Names: '|':UIImageView:0x792cf380 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x792d6890 H:[UILabel:0x792c8480'Loading...']-(20)-| (Names: '|':UIImageView:0x792cf380 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-02-26 12:00:09.407 Angel[6336:100953] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x792c4740 H:[UIImageView:0x792cf380(-50)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x792c4740 H:[UIImageView:0x792cf380(-50)]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
I tried to move
in "viewDidAppear" method instead of in "viewDidLoad" method. The first time I am able to display the progress HUD, but from the second one I get the same "warning message" in the output window and I was not able to see the progress HUD.
Could you try to fix it?
Thank you very much.
The text was updated successfully, but these errors were encountered: