Selfie Hacks

seen from China
seen from United States
seen from United States
seen from Denmark
seen from India
seen from United States
seen from United States
seen from Brazil
seen from United States
seen from United States
seen from China
seen from Vietnam
seen from United States

seen from Romania

seen from Türkiye
seen from Romania

seen from Romania
seen from United States

seen from Russia

seen from Romania
Selfie Hacks
Who does not like magic tricks? But despite of traditional magic done by professional magicians, what if you do these online tricks to impress your fr...
How to create snow flakes by throwing hot water into cold air.
Have a blurry vision?
Can't see in the day?
These simple moves will surprise you! See it to believe it!
So I wrote a pretty cool addition to DMAFWebViewController.
If you set webViewController.webView.footerView to a UIView, the view will be placed inside the webView's scroll view below all the web content. If the web content changes size (because a page loads) the footer will be pushed below the web content.
I think this may be a novel way of doing this. Googling around for a way to add a footer to UIWebView I found UIWebView with Header and Footer which uses javascript calls to ask the webview how large its content is.
I also used objc_setAssociatedObject to store the content size. You need to remember the last contentSize because you need to adjust the contentSize in order to make room for the footer. You'd get infinite recursion if you didn't watch for this. The reality is I could easily have used a property to do this, I was just keen to try out the whole associatedObject thing.
The above linked commit details all the changes needed to make this happen.
EDIT: Pages that are shorter than the UIWebView's frame don't trigger a contentSize change. Adding this to layoutSubviews fixes the issue by triggering one manually the first time layoutSubviews is called:
if (!objc_getAssociatedObject(self.scrollView, "associated_height")) { NSValue *value = [NSValue valueWithCGSize:self.scrollView.contentSize]; [self observeValueForKeyPath:@"contentSize" ofObject:self.scrollView change:@{NSKeyValueChangeNewKey : value} context:nil]; }
See this commit for the change in action.