Navigation bar in iOS 6 look like bar in iOS 7 - ios6

Is there any way to make navigation bar elements (back button) in iOS 6 look like navigation bar elements in iOS 7 ?
And also buttons and other iOS 7 elements of UI.

Instead of putting code into every view controller that you need to customize, I would recommend doing this for the entire application by putting something like this in your application:didFinishLaunchingWithOptions: method in the App Delegate
// Nav bar
[[UINavigationBar appearance] setBackgroundImage:[[UIImage imageNamed:#"navBar.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(10, 5, 10, 5)] forBarMetrics:UIBarMetricsDefault];
// Back buttons
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[UIImage imageNamed:#"backNavButton.png"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// Toolbar
[[UIToolbar appearance] setBackgroundImage:[[UIImage imageNamed:#"toolbar.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(10, 5, 10, 5)] forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];

You can customize the navigation bar by setting the background Image like this
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:#"topbar.png"] forBarMetrics:UIBarMetricsDefault];
And you can add a customize bar with setLeftBarButtonItems method like this.
[self.navigationItem setLeftBarButtonItems:];

Related

How can I make rounded rectangle Maskable icon for PWA without background?

I tried to generated maskable icon for my Reactjs PWA app with maskable.app => select "Rounded Rectangle" => Export but the app icon added on the home screen always appears to have background color fill outside the rounded rectangle app icon.
Something like this:
What I want:
Is there any way to achieve this? Or that's how PWA works?

In xcode 9: Why status bar set white when hide navigation bar?

Since Xcode update to 9 the status bar stay with white background if I hide the navigation bar:
navigationController?.setNavigationBarHidden(true, animated: false)
Before, it kept the color of the navigation bar.
The only solution was to create a new status bar:
let statusBarView = UIView(frame: UIApplication.shared.statusBarFrame)
let statusBarColor = Constants.Colors.Blue
statusBarView.backgroundColor = statusBarColor
view.addSubview(statusBarView)
Why it works like this now? It is a bug?
I just got the same issue.
You have to disable "Adjust Scroll View Insets" for your ViewController in the Storyboard/XIB, that's all !

How to implement like result after capture screen shot on IOS 11

On IOS 11 After capture screen shot..We will see a floating windows contain result image of screen show and it's can drag, move around screen and on top all app and all screen?
How can I custom a view ..which same result like image bellow

Sencha Title Bar Overlaps With iOS7 Toolbar

There is a problem with the title bar on iOS7: the iOS7 toolbar overlaps the title bar and its buttons. The buttons are tapeable, but barely. I'm seeing this on the app I created, which is packaged as a native app using PhoneGap.
I'm sure the people at Sencha will fix it in a later version, but what's the best fix in the meantime? The so-so solution seems to be to use CSSĀ to push the content of the title bar down.
Thanks for any more graceful solution.
I found the solution (hack) in this page
basically you just have to compare if the iOS version is bigger equals than 7 and if it does, increment the height of the toolbar.
Here is the code:
app.js
launch: function() {
// Destroy the #appLoadingIndicator element
Ext.fly('appLoadingIndicator').destroy();
// Initialize the main view
Ext.Viewport.add(Ext.create('StromRechner.view.Viewport'));
// Adjust toolbar height when running in iOS to fit with new iOS 7 style
if (Ext.os.is.iOS && Ext.os.version.major >= 7) {
Ext.select(".x-toolbar").applyStyles("height: 62px; padding-top: 15px;");
}
},

Make custom item in UIActivityViewController icon colorful?

I follow the steps in How can I create a custom UIActivity in iOS? It works as expected. It looks like iOS force a metallic look&feel for all custom icons as well as its own "Bookmark", "Print", etc. Anyway to make my icon colorful?
As of iOS 6, it is not possible to do this.
All color data for the UIImage that is returned by UIActivity's activityImage method will be ignored.
In iOS 10, set the activityCategory class property to .share. This will cause the activity icon to appear in color in the top row of the UIActivityViewController.
In your UIActivity subclass:
In iOS 10, set the activityCategory class property to .share. This will cause the activity icon to appear in color in the top row of the UIActivityViewController.
In your UIActivity subclass:
class MyCustomActivity: UIActivity
{
...
override open class var activityCategory: UIActivityCategory
{
get
{
return UIActivityCategory.share;
}
}
...
}

Resources