How can I set fixed toolbar at the bottom of screen with DialogViewController in Monotouch? - xamarin.ios

I have DialogViewController I select some data from web service, and add root, and my root view height is always increase (like load more tweets) and I want to fix toolbar. However I didn't do it. when I add toolbar, it added end of root view, but I want that it should be fix on screen. Please help, how can I do that?

You should have the toolbar in your parent view controller. Look at the UITabBarController for an example.

Related

Android Studio - How to change layout

In Eclipse, I can right - click on my layout (say LinearLayout) and click on Change Layout
In Android Studio, I dont see anything like that. I do see Morphing but that will now show up at all times. For example, if you create simple HalloWorld with RelativeLayout, if you right click on that Layout while in Graphical mode, Morphing will not show.
If you right click on a widget in that layout, Morphing shows but to change widget type, not layout type.
If you want to change the Layout, you can do Two things:
OPTION 1
1. Simply click into your Xml file and select the "Text" option at the bottom on your screen
2.Change to layout
OPTION 2
1.Just drag another layout in Design and put your items in it, delete your old layout PS. you can have layouts in other layouts
Hope I helped!
In Android Studio 3.6.3 the easiest way to change the Layout is to right-click on the layout in your Component Tree and click Convert view….
The other option is to delete this layout and create new activity layout with type you want to be.
You also can use AbsoluteLayout, just change RelativeLayout to AbsoluteLayout in activity_main.xml. With AbsoluteLayout you're more "free"

iPhone 5 (4") bottom toolbar not responding

I'm trying to modify an app to work with the new iPhone 5, 4" screen.
I've added the new launch image, "Default-568h#2x.png".
After that everything seemed good. Middle portion of my views is resizing ok.
However I've noticed that in a view where I have a bottom toolbar, the buttons on the toolbar are unresponsive. It looks ok, but tapping buttons does nothing. Same code run in simulator with 3.5" screen works fine.
Any ideas?
This view is within a navigation controller. It consists of a table view and toolbar. The tableview is set to resize height.
I had the same problem and noticed that my window.frame.size.height was still 480.0.
Solved this problem by enabling Full Screen at Launch for the MainWindow.xib file:
Steps:
Open MainWindow.xib
Select the Window element
Open the Attributes Inspector
Under Window section, enable Full Screen at Launch
There are two solution to this problem :
If you are using MainWindow follow these steps :
a. Select MainWindow.xib
b. Select 'Full Screen at Launch' from Windows option available in Attributes Inspector.
If your application doesn't contain MainWindow then just add 'Self.View.Frame = [UIScreen mainScreen].bounds' in ViewDidLoad.
I your project has MainWindow.xib then you must have to set all splash images in order to compatible you app for iPhone 5 display.
My Project wasn't using MainWindow.xib. I added the following to viewDidLoad in View Controllers of all the screens:
self.view.frame = [UIScreen mainScreen].bounds;
add
self.window.frame = [UIScreen mainScreen].bounds;
in this method:
-(BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary*)options
in your %your app name%AppDelegate.m file

Cocos2D, UIScrollView and CCMenu

I use an UIScrollView to set the position of a CCLayer (when i drag with the finger). It work fine but in this CCLayer i've got a CCMenu with one button CCMenuItemImage.
When i click on this button it's ok. But if i press the button and drag just a little bit the layer, the button stay pressed and become not responsive.
thanks for your help
The UIScrollView interferes with the touch events received by CCMenu. It was never designed to share its touches with a UIView.
You have these options:
find and fix the issue by modifying the CCMenu class
write your own menu class
don't use UIScrollView or disable its touch input while the menu is active
I think you'll need to modify CCMenu and attempt to disable the scroll view's ability to scroll on touch. Have a look at the UIScrollView properties called scrollEnabled and delayContentTouches.
By the time the CCMenuItem callback has been called, it might already be too late.

inputAccessoryView not hide the view when -resignFirstResponder?

I have attached a toolbar with a UITextField and UIButton to the keyboard when it becomes the first responder via the user taping inside the textfield
textField.inputAccessoryView = theToolbar;
Problem is, the toolbar disappears when the keyboard is dismissed, thus preventing any further input.
Any ideas on how to make the toolbar go back to the bottom of the screen rather than off it completely?
I'm thinking a delegate method might help but Im really not too sure. It seems once the inputAccessoryView always the inputAccessoryView :(
Cheers
The input accessory view is automatically dismissed with the input view (the keyboard, in this case). Generally you do not want to have an input accessory view in your view hierarchy. Instead, if you want your toolbar to scroll up when the keyboard is shown, you should follow the guidelines for Managing the Keyboard.
You could try using an additional toolbar that is offscreen as the inputAccessoryView, which could "fake" the appearance of what you are trying to do. Alternatively, have you tried adding the toolbar back to the bottom of the screen using
[self.view addSubview:theToolbar];
when the keyboard reaches the bottom of the screen? You can use keyboard notifications for this.

ModalPopupExtender adding scrollbars in SharePoint

Whenever I show a ModalPopupExtender on my Sharepoint site, the popup shown creates both horizontal and vertical scrollbars. If you scroll all the way to the end of the page, the scrollbar refreshes, and there is more page to scroll through. Basically, I think the popup is setting its bounds beyond the end of the page. Has anyone run into this? Searching Google, it seems this may be a known problem, but I haven't found a good solution that doesn't include recompiling AJAX, which my boss will not allow.
Hacky answer would be to grab the IE Developer Toolbar, find the tag that has the scrollbar, and alter your CSS file to add the overflow:hidden property to it.
I assume the TargetControl is of sufficient size to hold everything you put in it? If so, try:
Set CSS overflow:hidden;
If the target control is a Panel, set scrollbars="none". Otherwise, put it in a panel and try it.

Resources