I want to have a view controller with navigation bar and main view looks like this:
Is it possible?
I found a solution for this, just set navigation bar to transparent:
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.isTranslucent = true
and set UIImageView to fit full screen
Related
I have a issue with swift 2.0 and ios9. I can't completely make navigation bar transparent. I know there is a thread with this issue, but looks like i am the only one that is getting the black color of navBar.
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: .Default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.translucent = true
/*
* Make navigation bar transpadent.
*/
private func navBarSetup(hidden:Bool, trans:Bool){
self.navigationController!.navigationBarHidden = hidden
self.navigationController!.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: .Default)
self.navigationController!.navigationBar.shadowImage = UIImage()
self.navigationController!.navigationBar.translucent = trans
}
make sure your nav bar in storyboard is enabled + check extend edges: Under top Bars
the large glyph all on the left . small glyph on the right with vertical allignment.
all the button are generated on the code.
this is my code using c# for winform showing
RibbonPageGroup pagGroup = new RibbonPageGroup();
BarButtonItem barButtonItem = new BarButtonItem();
pagGroup.ItemLinks.Add(barButtonItem);e
You should add your bar item links into PageGroup one by one. For small items use the BarItemLink.BeginGroup property to separate all the next items into button group:
// ribbonPageGroup1
ribbonPageGroup.ItemLinks.Add(barButtonItem1);
ribbonPageGroup.ItemLinks.Add(barButtonItem2);
ribbonPageGroup.ItemLinks.Add(barButtonItem3, true); // begin group
ribbonPageGroup.ItemLinks.Add(barButtonItem4);
ribbonPageGroup.ItemLinks.Add(barButtonItem4);
Use the BarItem.RibbonStyle propety to specify display options for specific bar items:
barButtonItem3.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText;
I am having an issue with UIImagePickerController with allowsEditing = YES.
I am unable to crop the image from the bottom but also I have an extra empty space on top when moving the crop rectangle.
Also in the method.
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
I log info and it gives me wrong CropRect (which is not square!)
UIImagePickerControllerCropRect = "NSRect: {{0, 357}, {666, 646}}";
UIImagePickerControllerEditedImage = "<UIImage: 0x7f9b8aa47b30> size {640, 618} orientation 0 scale 1.000000";
UIImagePickerControllerMediaType = "public.image";
UIImagePickerControllerOriginalImage = "<UIImage: 0x7f9b8868e5a0> size {1500, 1001} orientation 0 scale 1.000000";
Does anyone has this bug and how do you fix it?
See the picture below
I have no idea how, but i totally removed "View controller-based status bar appearance" key row (just fully delete this row) in .plist file and it fixed this bug
I couldn't set the "View controller-based status bar appearance" to YES, so I have tried to hide the status bar when I show the UIImagePickerController like so:
let imagePickerController = UIImagePickerController()
...
myViewController.present(imagePickerController, animated: true) {
UIView.animate(withDuration: 0.25, animations: {
UIApplication.shared.isStatusBarHidden = true
})
}
Then on the UIImagePickerControllerDelegate didFinishPickingMediaWithInfo I show the status bar, and it worked.
I have page xyz.com that has a div id="abc". So I want to redirect to div abc from another page www.xyz.com/#abc.
can you tell me how to get xyz.com/#abc top position in number? I tried in body
var hash_value = window.location.hash.replace('#', '');// get abc
var top = $(hash_value).offset().top;
is not working . I want to redirect xyz.com/#abc will animate and scroll to #abc .
I have many div like #abc so I need something dynamic js code like
var top = $(this.hash).offset().top;
$('html, body').animate({scrollTop: top}, 500, function() {});
its working when I put
var top=1300;
1300 is the top position of #abc ;I want top position get dynamically for #add #bar
dynamically getting #abc is not possible then is it possible to pass value with
click here
Thanks in advance.
You will need javascript. You can do something as scroll. When you load the page, then after that scroll the page 28px down as
$('#abc').scrollTo(28); // scroll 28px down
You will use this function inside $('body').load(function ()
Put
#abc {padding-top:28px; margin-top:-28px;}
in your css.
Fiddle here: http://jsfiddle.net/MrLister/AGzX7/5/
You can test by showing http://jsfiddle.net/MrLister/AGzX7/5/show (normal view) or http://jsfiddle.net/MrLister/AGzX7/5/show#abc (with abc on top, starting below the menu bar).
(Make sure your window is narrow enough to enable #abc to scroll to the top, otherwise you won't see it!)
I agree with Afzaal
$('body').load(function(){
$('#abc').scrollTo(0, 28) // using plain javascript
})
or
$('body').load(function(){
$('#abc').scrollTop(28) // using jQuery
})
Here is the problem. I've created custom RectangularBorder and set it as border skin for TitleWindow. After this manipulation inner content of window is starting at 0,0 point of it. How could I set offset of it?
Just setting top padding does not work because scroll bar still begins from the top of the window after this manipulation.
There are lots of problems with trying to skin panels in Flex 3, and TitleWindow inherits from Panel.
This is the best explanation I've seen. (I'm not the same Glenn referenced in the italics :)).
For programmatic skin it went out pretty simple. One should override function get borderMetrics to do so:
public override function get borderMetrics():EdgeMetrics
{
var borderThickness:Number = getStyle("borderThickness");
var cornerRadius:Number = getStyle("cornerRadius");
var headerHeight:Number = getStyle("headerHeight");
return new EdgeMetrics(
borderThickness,
borderThickness + headerHeight,
borderThickness,
borderThickness);
}
try to use padding-top , padding-left etc as a style for your TitleWindow