Custom UI segmented control - objective-c

I'm wondering if in IOS is possible to customize segmented control like the attached image. I have tried to change buttons image, but the segmented control container is still visible under the customized buttons. I observed that the segmented buttons title disappears if you add button image. Custom button images must include title?
Many thanks

Just roll your own. Make three UIButtons with two images for each state and write logic to allow only one of them to be selected.

Related

How to display show/Hide button in highlight regular mode of NSOutlineView?

How to display show/Hide button in highlight regular mode of NSOutlineView?
I have a grop item at the top of NSOutlineview. I try to display show/hide button in that group item, but I can't find any method to do it. The source list mode can display it but regular mode doesn't.
Is it possible to display show/hide button in highlight regular mode of NSOutlineview?
thanks for helping
This behavior is specific to the source list appearance. There is no public API for getting around this, as it's an intentional enforcement (on Apple's part) of standardized appearances. You could dig around in the headers to look for a way to "hotwire" things, but use of private API bars you from distributing your app through the App Store.
The easier (non-private-API-using) route is to create your own cell view with a borderless button with show/hide title. Use a mouse tracking area (see NSTrackingArea) on the cell view (the superview of your button) to set the button's alpha (via its animator) to fade the button in/out on mouse in/out. Your button would tell the outline view to expand/collapse its cell view's represented item (the easiest way would be to define an outlet to the button via your custom NSView cell view class and configure the button's target/action when the cell view is created for the item).

Yosemite Toolbar Style

How do I get the new toolbar item style of OSX Yosemite?
I created a standard toolbar, but the buttons don't have that button-like look. Do I need to drag actual buttons to the toolbar to get this look?
What I have:
What I want (that round bezel and white background):
There are two types of items in toolbars, image items and view items. It looks like you have an image item. You seem to want a view item where the view is an NSButton configured as a round textured button. So, yes, you should drag actual buttons to the toolbar.
I would not attempt to control the button background. You should use the button as-is to get the default system appearance. Apple recommends using a PDF template image (all black with the alpha channel used to make the image). The button itself would not have a title/label. Rather that would be on the containing toolbar item.
It looks like you may have applied an internal blue "glow" or highlight to your image. Generally, you should not do that. Let the frameworks apply appropriate effects to the template image automatically based on the button state and shows-state-by mode.
Toolbars in the Human Interface Guidelines
Controls which are appropriate to use in the window frame (including the toolbar)
Designing images for toolbar buttons
Works just fine for my Cocoa app under Yosemite -
are you actually setting the template property for your icon images..?
From the NSImage docs:
The 'template' property is metadata that allows clients to be smarter
about image processing. An image should be marked as a template if it
is basic glpyh-like black and white art that is intended to be
processed into derived images for use on screen.

Xamarin Forms: Show an entrybox after tapping an image

I am trying to show an entrybox after tapping an image.
I have this:
And I want to achieve this after tapping on the keyboard image:
The gesture is not a problem I add this lines:
keyboard.GestureRecognizer.Add(new TapGestureRecognizer((view,args) =>
{
ShowEntryBox();
})):
The problem is that I do not know how I can show the entry box, I use XAML. I tried relativelayout and I saw samples of absolutelayout but I can not achieve it.
I am using Xamarin forms to android and ios App.
Perhaps try a Grid?
In the center cell you can create two child controls:-
*) Label control.
*) Entry control.
and then give these controls each a name and set the appropriate .IsVisible value on each of these two controls accordingly, or alternatively hook the IsVisible for each of these controls into a ViewModel and set the state there instead.

Swipe to see options in iPad

How can I implement swipe to see more options? There are lot of libraries that I could readily use, but they all are designed for iPhone apps. In iPad you have a lot of space, and I want to stack the buttons vertically instead of horizontally.
Is there any library for this? If not, how should I go about building this as a custom cell?
I tried building a custom UITableViewCell class which adds a UIScrollView, but it's not the same as showing the buttons beneath the cell.
Based on your inputs I have created a simple custom cell with basic functionality of swipe to see utility buttons and of course buttons stacked vertically.
What I did was, add a UIView beneath the cell's content view and positioned at right. Now depending on the number of buttons provided each button's height is adjusted accordingly. And delegates are provided for button clicks.
Swipe gestures are added. On swiping left it will animate and shift the cell's content view to reveal the button view. On swiping right it will reset the cell to original position.
You can customise it from here onwards as you wish :)
I have uploaded them over here : https://github.com/srikanth-vm/GSSwipeableCell

Changing what is loaded by a nib file

in my iPad application I have a panel of buttons, I have used an UIImageView as this panel and put buttons on top of it and created my nib file. in some views some button of this panel should not be displayed. so what i do is removing those buttons and decreasing the height of the panel (a UIImageView) then reposition the button to take up the space of the removed button. I have created outlets to all of these.
Is this the way to do this? My problem is if I want to change the order my buttons are displayed at some point I can't do it by simply changing the nib file. I'll have to do some changes in the code as well.
In this case don't use the nib to position the buttons in the first place. It sounds like this is one of the occasional cases where you would be better off working solely from code.
Instead of having to worry about some sort of abstraction that protects your layout if you decide to reposition the buttons and about removing and repositioning buttons, you can just do the layout at runtime once your particular view knows what buttons it needs. Your code is already doing much of the work of layout already (removing and repositioning).