How to link a button to a new window?

Discussion in 'iOS Programming' started by pcs are junk, Jan 16, 2010.

  1. pcs are junk macrumors 65816

    Joined:
    Sep 28, 2009
    #1
    I am create a tips application for the iPhone. I have a few buttons and would like to link them with other windows inwhich I have designed for people to read the tips. Now I have tried multiple ways of doing this, and none of them have worked. Can someone post the correct directions to do this. Do I need to code it to do this? Thanks in advance!
     
  2. iLoveDeveloping macrumors 6502

    Joined:
    Sep 24, 2009
    Location:
    Ireland
    #2
    Do you need to code to make a button work??????? Are you kidding me?! :rolleyes: God, im not that good at coding but even i know that!!! You are at stage one! Please dont try to make an App if you don't even know how to do "THE MOST BASIC" things.....

    Learn objective C before you try make apps maybe??.....
     
  3. pcs are junk thread starter macrumors 65816

    Joined:
    Sep 28, 2009
    #3
    uhh sorry newbie, but it does take coding to make a uibutton go to a uiview. i had to rewrite this app 4 times and i have 1 error left. so yeah apparently u dont know what ur talking about.
     
  4. iLoveDeveloping macrumors 6502

    Joined:
    Sep 24, 2009
    Location:
    Ireland
    #4
    Am......... WHAT?


    Was that English or are you trying to write in code?
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #5
    Post your error. Post your code.

    And yes, you do need code to do this. You can't create apps in IB. That's not programming. Learning to program isn't about following directions like learning to use Photoshop or Final Cut Pro or some other app. It's about understanding concepts and learning how to break things down. I'd suggest picking up a book - there are links at the top of this forum for how to get started - use them ;)
     
  6. pcs are junk thread starter macrumors 65816

    Joined:
    Sep 28, 2009
    #6
    ive already solved this one, but now i need help with this last error. i need it to be fixed in order to run the app. please tell me what i need to do to fix this. i cant find any information on this one because it isnt something in general. so maybe on of u knows how to fix it.

    here is the code for MainView.m, can someone just quote me and put in red the thing that fixes it. thank you so much!

    #import "MainView.h"

    @implementation MainView

    - (void)awakeFromNib {
    [self addSubview:MainView];
    }

    - (IBAction)ContinuetoiPhoneTips {
    [MainView removeFromSuperview];
    [self addSubview:iPhoneTips];
    }

    - (IBAction)iPhoneApplications {
    [iPhoneTips removeFromSuperview];
    [self addSubview:iPhoneApplications];
    }

    - (IBAction)HackingyouriPhone {
    [iPhoneApplications removeFromSuperview];
    [self addSubview:HackingyouriPhone];
    }

    - (IBAction)SecretsoftheiPhone {
    [HackingyouriPhone removeFromSuperview];
    [self addSubview:SecretsoftheiPhone];
    }

    -(IBAction)KeepingyouriPhoneSafe {
    [SecretsoftheiPhone removeFromSuperview];
    [self addSubview:KeepingyouriPhoneSafe];
    }

    - (IBAction)ImprovingyourBatteryLife {
    [KeepingyouriPhoneSafe removeFromSuperview];
    [self addSubview:BatteryLife];
    }

    - (IBAction)Main {
    [BatteryLife removeFromSuperview];
    [self addSubview:iPhoneTips];
    }

    @end




    here is the picture
    Screen shot 2010-01-17 at 5.42.45 PM.png
     
  7. iLoveDeveloping macrumors 6502

    Joined:
    Sep 24, 2009
    Location:
    Ireland
    #7


    How on earth did you make all that if you can't even make a button?? Where did you rip that code from?

    P.S -

    Good luck with Apple on that one.....
     
  8. pcs are junk thread starter macrumors 65816

    Joined:
    Sep 28, 2009
    #8
    no u dont understand, this is a tip application. hacking your iphone means that when they open the actual app, it tells them why they shouldnt jailbreak or hack/modify their iphone, and gives reasons what will happen if they do it.
     
  9. pcs are junk thread starter macrumors 65816

    Joined:
    Sep 28, 2009
    #9
    also i didnt make the button, i used the round rect button, but i had to write a code to make a custom connection to get the button to open up another view. the regular connections refuse to go to the UIViews.
     
  10. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #10
    You appear to be trying to add your class (MainView) as an instance. You simply can't that. Once again: go away and actually learn something.
     
  11. pcs are junk thread starter macrumors 65816

    Joined:
    Sep 28, 2009
    #11
    ronnieduncan go away before i report you for instigating.
     
  12. iLoveDeveloping macrumors 6502

    Joined:
    Sep 24, 2009
    Location:
    Ireland
    #12
    Why does every 14 year old boy who gets an iPod form santa think they are now App Developers.... :rolleyes:
     
  13. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #13
    I just told you the cause of your error and you choose to attack me. Why? Also threats of reporting me to the moderators are pointless. Do it or don't. I'm pretty sure I've not broken any of the site rules. But then what do I know, I've only been posting here since 2002.
     
  14. pcs are junk thread starter macrumors 65816

    Joined:
    Sep 28, 2009
    #14
    alright you know what, screw it. we can be the worst enemies in the world but i really need ur help right now. why is the screen black when i simulate it by clicking build and go in xcode. and why is it white when i simulate it in interface builder?
     
  15. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #15
    Probably because the simulate interface command in IB uses all the code Apple wrote in IB to let you test your UI without needing the application code written whereas a real app, either for OSX or the iPhone (including the simulator) needs you to write your own code to get it up and running.
     
  16. pcs are junk thread starter macrumors 65816

    Joined:
    Sep 28, 2009
    #16
    how do i write my own code? can u start me off?
     
  17. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #17
    Read the stickies at the top of this forum. Learn C (paying particular attention to memory allocation and pointers) then Objective-C (ignore garbage collection as it's not available on the iPhone). Once you've done that spend some time reading the Cocoa Touch conceptual documentation so as you have an idea of how the Frameworks fit together, what design patterns are used and so on.

    This is not a fast process. I would expect for a beginner without good programming experience it will take at least a month or so.
     

Share This Page