Comments (7)
I found a little hack to avoid the problem, but it's not a real fix. I added a backgroundView (an UIView with the same frame of the tableView) on the tableView and then I showed the banner on the backgroundView.
from bryxbanner.
That's very weird -- the Banner is created with leading and trailing constraints that don't use constants. Care to share the code you used?
from bryxbanner.
import Foundation extension UIView { func showError(title: String, subtitle: String, image: UIImage?){ let banner = Banner(title: title, subtitle: subtitle, image: image, backgroundColor: UIColor.redColor(), didTapBlock: nil) banner.animationDuration = 1 banner.show(self, duration: 2) } }
And in a UITableViewController
self.tableView.showError("Impossibile caricare i dati dalla rubrica", subtitle: "", image: nil)
from bryxbanner.
+1
I'm with the same problem here. The banner is always fitting the text width.
Other hack that I found to avoid this:
Banner(title: title, subtitle: subtitle).show(view: self.tableView.tableHeaderView)
from bryxbanner.
same error here in a UIViewController. The banner is set as label's intrisinc size
from bryxbanner.
Is this still an issue? 😕
from bryxbanner.
this is related to uitableview hardcoding width of cells to 320 http://stackoverflow.com/questions/26373102/uitableview-cell-width-on-ios-8-stuck-at-320pt
in cellforrowat index try forcing the frame size
cell.frame = CGRectMake(0,
0,
self.tableView.frame.size.width,
cell.frame.size.height);
http://stackoverflow.com/questions/13025616/uitableviewcell-width-is-greater-than-uitableview-width
from bryxbanner.
Related Issues (20)
- MinimumHeight not work on with Bottom appear HOT 6
- Where is sound of notification? HOT 1
- Xcode 10 and Swift 4.2 HOT 9
- Lack of 'swift_version' in podspec file HOT 4
- Installation via Swift Package Manager
- Multiple Toast show at a Single time HOT 2
- Deployment Target is set to 8.0
- Is there any user data that is either being collected or Tracked by the BRYXBanner
- BRYXBanner/BRYXBanner-Swift.h file not found HOT 1
- CheeriosBanner
- Not respecting top safe area HOT 1
- status bar doesn't restore it's original style when dismissing banner manually HOT 1
- Support for sub views , adding Buttons and actions to the sub views would be great.
- Cannot be used in Objective-C project.
- Setting TextColor makes icon appear black HOT 1
- open url in didTapBlock HOT 1
- swift 4 error HOT 1
- Banner doesn't appears on IOs 11 HOT 4
- Issue when building last version 0.8.0 HOT 1
- iPhone X: bottom banner is overlapping with home indicator HOT 1
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 bryxbanner.