Xcode 4: Target and Commands. How do i make a button open "Window"?

So to keep this short i'm making a very simple program and i need some help from Mac Developers.
I'm making it in objective-C and i want to make 1-button target another program for example when u click on the button it "focuses" on iPhoto like when u click on it yourselves. Now i also want it to instantly, do some key-commands. I want it to target program > enter > write something > enter.
I'm need this very very much. Please help me, it can't be that hard, if it is possible.
Now in the bottom of the program it says my name, but there's also a little button to the right. Now i just started with Mac Developing, have been working for 2months with iOS in Xcode 4. So i know how you switch "views" for iOS, but how do i make this little button to the right, open a "window" (It's gray, hehe) and the button should be highlighted and when u click it again it goes back to normal and it closes. Now pretty much all i know is how to make the pop-up window remove the red dot and x in the corner, so u can't manually close it. I've tried googling highlighting button when the window is open, but didn't find anything.
Please someone help me, this program is a free program and not for the AppStore.
I'm making it for a group of Mac users.
<Edited by Host>

if you have a navigation controller do this: SecondViewCOntroller is the name to your .m (don't forget the import). SecondView is the name of your second View. You have to connect the function and the button in the xib file.
-(IBAction)press1
SecondViewController *nOVC  = [[SecondViewController alloc] initWithNibName:@"SecondView" bundle: nil];
[self.navigationController pushViewController: nOVC animeted:YES];
Look at an example in apple developper...
Perhaps it's not that because you learn during two months iOS and it's a beginner thing.

Similar Messages

  • How do i make a button open a new window...

    Hi,
    I'm making some very basic login software and i want the program to open up a new window when the "Login" button is pressed and then display a message saying whether the login was successful or not.
    Any help would be appreciated but i would love some code to help me see how to do it and help me on my way.
    Cheers.

    what do you exactly need, the "how to create and display a frame"? I bet your program already has a frame, so I suspect you know how to do that. Well, just do it again.
    Note: if its just a plain message you wish to display to the user, the easiest way will be by using javax.swing.JOptionPane, look for the showXxxx methods.
    If the question was more "how do I know when my button get pressed", take a look at that other question: http://forum.java.sun.com/thread.jsp?forum=57&thread=156406

  • How do you make a button open a new window?

    I am trying to create an action that opens a new window but cannot figure out how to do it. Does anybody have any help with where to start?

    Select a View-based Application give the name as Button & add a new file give the name SecondViewController,
    Write the following code in Button.m
    Import your SecondViewController , By writing statement
    #import "SecondViewController.h"
    - (void)viewDidLoad {
        [super viewDidLoad];
              UIButton *btnObj = [UIButton buttonWithType:UIButtonTypeRoundedRect];
              btnObj.frame = CGRectMake(40, 40, 70, 50);
              [btnObj setTitle:@"CLICK" forState:UIControlStateNormal];
              [btnObj addTarget:self action:@selector(nextView) forControlEvents:UIControlEventTouchUpInside];
              [self.view addSubview:btnObj];
              //[btnObj release];
    -(void)nextView{
              SecondViewController *secObj = [[SecondViewController alloc]initWithNibName:@"SecondViewController" bundle:nil];
              [self presentModalViewController:secObj animated:YES];

  • How make a button open a .swf file in a new window?

    How do I make a button open a swf file in a seperate window
    new window (like if i opened to swf file seperately)
    Anyone know ?

    well you can publish the the other FLA, which would give you
    an HTML file, upload that and the SWF then link to the SWFs' HTML
    page.

  • How do you make a link open on a new page (typically the target="_blank" command) in MUSE?

    how do you make a link open on a new page (typically the target="_blank" command) in MUSE?

    Newer version does not have the same interface.  I'm stuck trying to understand how to add a "blank" target to a hyperlink...  See how your screenshot has a dropdown associated with the "Hyperlink" object?  Mine doesn't...

  • I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • How do I make a button onj the form which will submit and send the pdf as an email?

    how do I make a button on the form which will submit and send the pdf as an email?

    You can set up a button with a "Submit a form" action and use a mailto type URL to specify the email address you want the forms sent do. If you want to send the entire PDF, select that option and not FDF or anything else. The mailto URL should not include any spaces and the "mailto" part should be lowercase, like:
    mailto:[email protected]
    This will attempt to initiate an email using the users default email client. If the user does not have one set up or there is some other problem, the email might not get initiated. If it needs to work with Reader versions prior to 11, then the form needs to be Reader-enabled, which you do in Acrobat 11 by selecting: File > Save As Other > Reader Extended PDF > Enable More Tools

  • How can I make a button that on press the object appears and on second press the object to disappear

    Hello,
    I'm quite new to flash programing, and I don't know how can I make a button that will make the object appear and disappear.Till now I have this code for the appear:
    on (press)
        _root.top1.gotoAndStop(2);
        _root.topp.gotoAndStop(2);
        _root.mm1.gotoAndStop(2);
              _root.m1.gotoAndStop(2);
    but from here I'm stuck.
    Thank you for your help

    What you can do is use the _visible property of the object to make it appear and disappear, or more correctly, use the opoosite of the _visible property.  You should not put code "on" objects, keep it in the timeline.
    If "object" is the instance name of the object you want to toggle, then in the timeline code you can use...
    object._visible = false;  // start with the object being invisible
    yourButtonName.onRelease = function(){
        object._visible = !object._visible;
    That one line in the function sets the object's _visible property to be the opposite of what it currently is.

  • How do you make an application open on a specific monitor?

    How do you make an application open on a specific monitor? I have two monitors, and I was able to get Firefox to open on the secondary display always by resizing it with the option or command key [I forget which one] and then quitting it. Now everytime I start it, it opens on the second monitor.
    However, when I try to do the same with QuickTime [when playing videos], it always opens on the primary display no matter what I do with it. How do I make it always open on the secondary display?
    Thanks in advance for any help!

    Thanks for the suggestion, but no, Spaces is not what I want. I have two physical monitors, and simply want an application to always open on one monitor, not be able to switch back and forth between different desktops.

  • How do you make the dashboard open automatically at login?

    Ok, you know in your dock you can right click on any application icon and it will come up with some options, one of them being "Open at Login." Well, I want to automatically open the dashboard at login, but when I right click on the dashboard icon it does not give that option. How do I make the dashboard open automatically when I log in?

    There is a freeware app called "Dashboard Starter" that will start the DB up when you log-in, or anytime you force quit the Dock.app.
    Search www.macupdate.com for it.
    iSMH

  • How do you make adobe X open the "combine pdf" window in the foreground?

    This may not be the correct forum for this question, but considering that I simply
    have not been able to get a reply in any other Adobe forum, I decided
    to just post this question to ALL Adobe forums until I get a response.........
    How do you make adobe X open the "combine pdf" window in the foreground?
    I am using a "Windows 7" computer at work with "Acrobat X Pro" and I'm constantly combining
    pdf's and tiff's in Acrobat.
    It would be nice if when I select 30 or 40 files to combine, the *******
    "Combine Supported Files in Adobe Acrobat" window would open in the
    foreground, not behind the 10 or so windows already open.
    I have been researching this for some time now with no solution.
    If the answer is that "IT CAN'T BE DONE", then that's fine. At least
    I will have an answer and can stop searching. If (as I suspect) it can
    be done, then kindly supply me with "step by step" instructions.
    Michael Jones

    Hi ,
    I guess that was a bug in that version .
    It does not happen in Acrobat XI and Acrobat DC .The window comes right in front of everything else .
    I wonder that was a bug and that was fixed the other versions.
    You could upgrade to the latest Acrobat version ,i.e Acrobat DC and you would not experience this anymore .
    Regards
    Sukrit Dhingra

  • I am trying to surf the Net and every time I click the SAFARI button, a window pops up saying that this application was closed all of a sudden

    I am trying to surf the Net and every time I click the SAFARI button, a window pops up saying that this application was closed all of a sudden. What can I do to solve this problem?

    How are you connecting to this website?

  • When I open a pdf, it used to open in Preview. Now my iMac requires Adobe Reader, but I prefer Preview. How can I make my iMac open pdf in Preview again?

    When I open a pdf, it used to open in Preview. Now my iMac requires Adobe Reader, but I prefer Preview. How can I make my iMac open pdf in Preview again?

    If an image opens in a different application but you want it to always open in Preview when you double-click it, do this one time: Control-click the file, let go of the Control key, press the Option key, then choose Always Open With > Preview. Or, select the image file, choose Get Info from the File menu, then change the "Opens with:" pop-up menu choice to Preview.
    Mac Basics: Preview app views and edits PDFs and images

  • How do I make a button NOT take focus when it is clicked?

    I am trying to create a virtual keypad and the problem is that when I have a Robot make a KeyEvent for a certain number when a certain button is pressed, the TextField loses focus and the focus is placed on the button that was pressed, so nothing appears in the TextField.
    How can I make a button NOT take the focus when it is pressed?
    Edited by: tox0tes on Nov 28, 2008 8:06 PM

    great. another way is to have a call to myTextField.requestfocus() in the button's actionlistener actionPerformed method, but that leads to tight coupling.

Maybe you are looking for