isair / isair/Toasty

Label should not be added to UIVisualEffectView

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

As the title states

When using visualEffectView as background the UILabel should not be added to the UIVisualEffectView, instead it should be added as subview of UIVisualEffectView.contentView

Below is the error raised:

```
2018-11-22 11:21:04.959084-0200 myApp[20123:7974388] Returning local object of class NSString
2018-11-22 11:21:04.975692-0200 myApp[20123:7974388] *** Assertion failure in -[UIVisualEffectView _addSubview:positioned:relativeTo:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3698.93.8/UIVisualEffectView.m:1859
2018-11-22 11:21:04.979518-0200 myApp[20123:7974388] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '> has been added as a subview to >. Do not add subviews directly to the visual effect view itself, instead add them to the -contentView.'
*** First throw call stack:
(0x1a5bd6f2c 0x1a4dd4284 0x1a5ae8fa0 0x1a65ea06c 0x1d2efb89c 0x10520c120 0x1047ffb10 0x1047ffc04 0x1a4dcf900 0x1d376fe08 0x1d31d6a34 0x1d31d6d68 0x1d31d5d08 0x1d37ab680 0x1d37ac8e0 0x1d378ad80 0x1d385c2a4 0x1d385ed5c 0x1d385f0d4 0x1d385769c 0x1a5b656a0 0x1a5b6561c 0x1a5b64ed4 0x1a5b5fbb4 0x1a5b5f494 0x1a7e12be8 0x1d376e68c 0x10482b3b8 0x1a5615050)
libc++abi.dylib: terminating with uncaught exception of type NSException
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.