Skip to main content

UIButton with Badge


Badges in iOS are the de-facto way to communicate new/unread information to users. The SDK allows for setting badges on tab bar items and on the main .app bundle icon. But what if you want to set a badge on a toolbar item? There is no official way to make a badge on a toolbar item, even though you as a developer may want to incorporate a badge. Introducing BarButtonBadge.h, the custom class to easily set a badge on a UIBarButtonItem. The usage is simple and understandable.

BarButtonBadge

Comments

Most Favorite Posts

Dark Theme (Dark Mode) in Android WebViews, WKWebViews and CSS

So your apps just implemented a shiny new dark theme and it’s looking 👌 There are lots of benefits to having a dark theme in your application, and having it consistent throughout your application allows for a great user experience. But what happens when the the user runs into a WebView in your app? Support: if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { ... } Set: WebSettingsCompat.setForceDark(webView.settings, WebSettingsCompat.FORCE_DARK_ON) Current setting: val forceDarkMode = WebSettingsCompat.getForceDark(webView.settings) Joe Birch Assuming your question is asking how to change the colors of the HTML content you are displaying in a WKWebView based on whether light or dark mode is in effect, there is nothing you do in your app's code. All changes need to be in the CSS being used by your HTML content. CSS dark mode via :root variables, explicit colors and @media query: :root {     color-scheme: light dark;      ...

Server-driven UI (SDUI): Meet Zalandos AppCraft and AirBnB Lona

A short WTF: Joe Birch:  SERVER DRIVEN UI, PART 1: THE CONCEPT Zalando seems to follow the SDUI principle as well - defining a common design language and construct the screens on the backend while displaying them natively on the clients. They even go one step further; they implemented a mighty toolset to enable non-technical stakeholders to define their own native app screens Compass: Web tooling to create screens and bind data Beetroot: Backend service that combines the screen layout definition with the data Lapis/Golem: iOS/Android UI render engines Crazy cool! Good job, guys (when you do an open-source release?) To even move faster a Flutter based UI render engine implementation was great! See also AirBnB Lona SDUI approach Building a Visual Language Why Dropbox sunsetted its universal C++ mobile project and AirBnB its React Native implementation

UIDeviceOrientation vs. UIInterfaceOrientation

We stumbled upon a bug in one of our apps: - rotate the Homescreen to Landscape - go to some other screen - put the device on the table and go back - the homescreen is all messed up This behavior was similar with some other View controllers. The problem was in the viewDidAppear where the Interface should be rotated to Layout or Portrait- the UIDevice Orientation was used ( [UIDevice currentDevice].orientation ) an when you put the device on the Table the orientation of the Device is always "UIDeviceOrientationFaceUp". The Problem is that the Device Orientation could be FaceUp in Portrait AND Landscape mode so for this use-case this doesn't give you the proper information. instead determining the orientation by: UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation) you should do this (at least in View controllers) and use the interfaceOrientation property: UIInterfaceOrientationIsLandscape(self.interfaceOrientation)

Sencha Animator

Rich CSS3 ads for every mobile platform. Captivate your audience. Engage your customers. Standards-based animation has never been so easy. With the power of Sencha Animator, use CSS3 animations to build the next generation rich-media ads. Animate text and images with smooth transitions, design buttons with gradients, and embed analytics. All backed by the strength of web standards. Whether it’s zooming through space, challenging foes to kung fu, or showing off your latest line of amazing products, Sencha Animator elevates your creative experience and deploys on all of today’s most popular devices. Complete output control. Animator’s output is clean and human readable. Designers unfamiliar with web programming can leverage CSS3, while advanced users have complete control over the output. Better design experience. Superior results. Animator gives artists the freedom to design and fully deliver on innovative ideas, generate better customer engagement, and drive higher client RO...

How to link to TestFlight App in iOS

There are two things you need to do. First, check to see if TestFlight is installed. Then create a new link to your app. NSURL *customAppURL = [NSURL URLWithString:@"itms-beta://"]; if ([[UIApplication sharedApplication] canOpenURL:customAppURL]) {     // TestFlight is installed     // Special link that includes the app's Apple ID     customAppURL = [NSURL URLWithString:@"https://beta.itunes.apple.com/v1/app/978489855"];      [[UIApplication sharedApplication] openURL:customAppURL]; } This special https://beta.itunes.apple.com URL will be opened directly in TestFlight. Finally, if you are using iOS 9 (or later), you need to make an addition to your Info.plist to get the canOpenURL: method to work. If your app is linked on or after iOS 9.0, you must declare the URL schemes you want to pass to this method. Do this by using the LSApplicationQueriesSchemes array in your Xcode project’s Info.plist file. For each URL scheme you wan...

Firebase App Indexing from Google for Android and iOS

Firebase App Indexing gets your app into Google Search. If users have your app installed, they can launch your app and go directly to the content they're searching for. App Indexing reengages your app users by helping them find both public and personal content right on their device, even offering query autocompletions to help them more quickly find what they need. If users don’t yet have your app, relevant queries trigger an install card for your app in Search results. App Indexing lets Google index your app just as if it were a website. For users with your app installed, deep links to your app - on Android or iOS - appear in Google Search results, allowing users to find exactly the right content within your app. In addition to driving re-engagement, App Indexing on Android will also surface install buttons for users who do not yet have your app installed. Since 1 in 4 appsare already being discovered through search, App Indexing is a simple and free method for acquiring new u...