Comments (16)
Original reporter doesn't know any other special options turned on, definitely not reduced transparency. It's a SE.
from ios.
@nickoneill Did you find out what iOS version they are on?
from ios.
@mccarron I'm seeing this on my iPhone 7 running 10.2.1.
There's a difference in the view hierarchy when I run on device versus when I run on sim (seeing proper effect).
Sim: UIVisualEffectView has three subviews: _UIVisualEffectBackdropView, _UIVisualEffectFilterView, _UIVisualEffectContentView
Device: UIVisualEffectView has one subview: _UIVisualEffectContentView
from ios.
@inuwali Does it always happen or is it fixed if you force quit the app?
from ios.
It is 100% reproducible, right from a cold launch. I'm currently trying swapping out the storyboard instance for a programmatic one to see if that has any impact.
from ios.
@inuwali Does this happen as a result of the view swapping animation that happens here? https://github.com/5calls/ios/blob/master/FiveCalls/FiveCalls/AppDelegate.swift#L41
from ios.
@inuwali Also you can try to debug the issue with this command in the debugger:
po [visualEffectView _whatsWrongWithThisEffect]
(in this case visualEffectView is actually headerView in that class)
Source: https://forums.developer.apple.com/message/76154#76153
from ios.
@mccarron Thanks for the tip; unfortunately having trouble as a Swift newbie getting this to work in LLDB. Have tried:
expr self.headerView._whatsWrongWithThisEffect()
expr -l swift -- self.headerView._whatsWrongWithThisEffect()
expr -l objC -- [self.headerView _whatsWrongWithThisEffect]
expr -l swift -- self.headerView.perform(Selector("_whatsWrongWithThisEffect"))
(this one gives back (Unmanaged<AnyObject>?) $R2 = (_value = AnyObject @ 0x00007fd9eb017500)
which I can't cast)
from ios.
@subdigital I'll check that to see.
from ios.
@subdigital No; since this happens after first run when that function is never called.
from ios.
Adding these lines to IssuesContainerViewController.viewDidLoad() worked:
let replacement = UIVisualEffectView(frame: self.headerView.frame)
let contents = (self.headerView as! UIVisualEffectView).contentView.subviews[0]
contents.removeFromSuperview()
replacement.contentView.addSubview(contents)
NSLayoutConstraint.activate([
replacement.contentView.topAnchor.constraint(equalTo: contents.topAnchor),
replacement.contentView.bottomAnchor.constraint(equalTo: contents.bottomAnchor),
replacement.contentView.leftAnchor.constraint(equalTo: contents.leftAnchor),
replacement.contentView.rightAnchor.constraint(equalTo: contents.rightAnchor)
])
replacement.effect = UIBlurEffect(style: .light)
view.insertSubview(replacement, belowSubview: headerView)
NSLayoutConstraint.activate([
view.topAnchor.constraint(equalTo: replacement.topAnchor),
view.leftAnchor.constraint(equalTo: replacement.leftAnchor),
view.rightAnchor.constraint(equalTo: replacement.rightAnchor),
NSLayoutConstraint(item: replacement, attribute:.height, relatedBy:.equal, toItem:nil, attribute:.notAnAttribute, multiplier:1, constant: 120)
])
headerView.removeFromSuperview()
headerView = replacement
So I assume that there's some storyboard loading problem.
from ios.
@inuwali I tried this but get some duplicate constraint warnings.
I think it might be worth moving the visual effect view entirely in code and simply have a 120pt tall container w/ the content view (with logo, location button, etc) defined in the storyboard. Then in viewDidLoad we can wake up and wrap the header view in the effect view.
Do you want to take a stab at this and send a PR?
from ios.
@subdigital
Yeah, the code I posted was just a trial to see if programmatic implementation would work. I'm happy to work on the solution and submit a PR.
from ios.
@subdigital PR forthcoming. FYI, I had to reverse one of your recent commits to get things working properly after I merged in the latest from upstream. It's commented.
from ios.
@subdigital @mccarron The PR is up.
from ios.
Closing, tracking on #85.
from ios.
Related Issues (20)
- Support dark mode
- Fix cell heights in iOS 13 HOT 2
- Upgrading doesn't carry over call progress
- Add donations to the app HOT 1
- Fix reminder / location header on iPad
- No-issue list of reps with phone numbers HOT 1
- Minor first-time header issue on iPad
- New "done" page with results, tally, share
- Improve app store screenshots HOT 1
- Doublecheck crashes in appcenter HOT 1
- Replace location and rep name in scripts with current call details
- IssuesManager.swift line 48
- Replace deprecated usage of UIWebView HOT 2
- iPad crash in iOS 13
- iOS 14: Home Screen Widgets HOT 9
- iOS 14: One-time Location
- iOS 14: App crashes on ScheduleRemindersController
- iOS14: App Clip HOT 2
- Sign in with Apple HOT 1
- All issues list doesn't display progress on completion circles HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ios.