Print Document opened in QLPreviewController with Right menu button? - objective-c

I have opened the document (PDF) in QLPreviewController. I want to print that document on clicking right button on the top of the screen. I need code example to print it. I don't want email option over there. thats why I cannot use UIDocumentInteractionController.

With QLPreviewController, what you see is what you get.
You are either stuck with the share button and all the options it gives (print, email, etc) or you rewrite that button yourself using UIActivityViewController.
In your instance of QLPreviewController, you can overwrite that button in viewDidAppear by doing :
[self.navigationItem setRightBarButtonItem:nil];
Note this just removes the button altogether but you can create your own button and add your own sharing options to it as well. See this for more info.

Related

I am having trouble while clicking a "Submit An App" button on my application which is present on the Menu bar

I am using the below code for this, this is present inside a frame and this also clicks the button but after button is clicked the control is lost. The possible reason i see is the page lands on same page which extra options after the "Submit An App" button is clicked.
I am using c# to code it. The first line finds the button the second line clicks but go for a timeout. I have seen this behavior fist time not sure how to work it out.
IWebElement field = VelocityDriver.FindElement(By.Id("AppSub"));
SeleniumExtensions.ClickElementAndContinue(field);

dojox form uploader button is clickable only on the border, but not on the full button

I am using IE8
I have created dojo button as below
It has displayed button "Select Files".
Problem
When I click on top border of button its working fine. When I click on any other places on button file picker dialogbox is not displaying.
When I right click on button and select zoom in option once, I am able to click on all the coordinates of button(after selecting zoom option, it works similar to html button).
Note: I have used flash for multiple file selection.
Please tell how to make this button work by clicking in any place.
Have you checked if there is other element's borders in front of the button? Try to check with the developer tools option activated on your browser and select "inspect element" (or similar). If another element is detected when you hover over the button, you have your answer.
Apart from that I have no more ideas.

NSOpenPanel New Document button not working

I can't seem to get the Open Panel's New Document button to work. Currently I am just using the default application provided Open Panel (iCloud enabled OS X app) which has a New Document button at bottom left of the window.
However I just get a system beep when I click on it, I would expect this button would do the same as File->New menu option but it does nothing other than beep.
How can I either enable this button to simply create a new blank file or remove it altogether.
Finally I figured it out.
It seems the New Document button is somehow hardware to the CMD+N keystrokes. I had reassigned CMD+N to apply Normal style to text and this breaks the New Document button.
Seems odd that the button is not wired to newDocument method on First Responder rather than to a keystroke combination.
EDIT
I logged a Bug ID# 14886108 and it seems it may be fixed in Mavericks

App calls Method on mouse click. How can I stop it?

So I am pretty new to Xcode and Objective C, I've been using it about 2 weeks now. I am building an app for OSX. One of the windows in the app has 5 text boxes, some labels and a submit button at the bottom. The submit button is linked to a method that closes the window, opens a new one and outputs the contents of the text boxes into one text field on the new window.
I had it working correctly, but now when I do anything but click on the top text field the submit method is called and the window closes. I can click on the black space in the window, but click on any of the objects calls the method. Also, pressing tab calls the method. I am not sure when I did to cause this error, but any insight or tips would be very useful.
Sorry if this is vague, I'm not even sure how to describe the problem. If you need any specific information please ask.
Try looking in Interface Builder. Ctrl Click or Right click on the each one of the fields that are responding with calling the function. See if they are linked to the function.
Also check the "responder" as was suggested earlier. You can do this by also right click or ctrl clicking the red responder box labeled "responder". See if anything in there maps to your function

How to create a nice add button to list view like in the Weather app?

Following these steps:
Open the Weather app.
Right click
Click on places
See that little item with the + symbol? I want to do something exactly like that, the looks and behaviour.
Assuming you are just trying to get some basic ideas about metro-ui controls and you are on Release Preview.
When you do right click, the control that's being triggered is called App Bar. The "place" button is a App Bar Command. Clicking on the button will take you to another page (HTML or XAML). This page contains a ListView control with GridLayout. You can dynamically change the ListView Template and assign different actions to the itemInvoke event.
Here is a quick tutorial for App Bar and commands:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465309.aspx
Here is a quick tutorial for List View control:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465496.aspx