CustomUINavigationBarDemo
Demo app showing two techniques for customizing UINavigationBars in iOS
Install / Use
/learn @rtwomey/CustomUINavigationBarDemoREADME
Custom UINavigationBar Demo
This is a simple app that shows two techniques to achieve some level of customization of your UINavigationBar. This is applicable for both iPhone and iPad apps.
Be sure to check out the companion tutorial: Custom UINavigationBar: Two Techniques
-
Embedded UIView in UINavigationItem's title area
A UIView is created which contains a UILabel and a UIImageView. This view is then configured to have a clear background (with opacity turned off) so it looks like the image and label are by themselves in the UINavigationBar.
This is useful for most cases where you just want to add an icon or some other customization to your nav bar, while still being able to make changes entirely within the XIB.
-
Subclass UINavigationBar and override drawRect
Another common way of customizing how a UINavigationBar looks, a subclass is created that overrides drawRect to load a UIImage and display it as the same width & height of the standard nav bar. The XIB is then updated to point to this subclass instead of the default.
Copyright 2011 Draconis Software, LLC. MIT License
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
