Lock screen in Xcode

Hello
I'm new in Xcode. I would like to make an Lock Screen application.
How can I tell the textfield that when the word 'test' is entered, the program closes.But if Ienter a different word should appear a message.
Example code would be helpful.
Thanks
Mario

For the target application, you'll want to use the frameworks; without intending offense, the only folks that ask for and process passwords directly are usually folks that are trying to steal the user's passwords.  The following is an OpenGL framework for a screensaver: Writing a Screen Saver (part I), Writing a Screen Saver (part II) and here is part of the Apple screen saver framework documentation.  That'll get you some idea of what's involved with using the existing frameworks available here.  Now in fairness, this probably really isn't what you want, if you're just learning Cocoa...
If you're looking to display a dialog box or other window and prompt for input and react to it (and I'd stay away from the "passwords" stuff for now; you're writing the first part of a Guess The Animal-style program, or whatever), that's a fairly straightforward Cocoa application.
Posting an example of what you want is slightly difficult, as the easiest way to do most of what you're after is with the Interface Builder tool and that doesn't post well here; a fair chunk of the generic prompting application is "just" making the connections in IB.  (The amount of source code to do the simplest form of string comparision is a couple of lines around the NSString's isEqualToString method (there's some example code lined at the end of the isEqualToString method definition) as the core test.
If you're new to C and/or Objective C and/or Cocoa programming, I'd suggest one of the available books on Cocoa and Mac OS X programming.  There are various guides and Apple intro material including Your First Mac App, and both Big Nerd Ranch and Pragmatic Programmers have programming books available, and there is online materials such as this course at CocoaDevCentral - that last course is a bit stale, as Xcode has been a moving target recently.)
And there's a veritable goldmine of sample application code available directly in the Xcode-provided documentation.
There is far more development-related traffic in the Apple Developer (Discussion) Forums, and particularly on the various mailing lists including the Cocoa mailing list and particularly in the archives of the mailing list.

Similar Messages

  • HT1384 My lock screen/power button on my iPod Touch is broken, and I need some assistance.

    As the title suggests, I can not use the lock screen/power button on my iPod Touch, it is broken. I can use Adaptive Touch to turn the screen on and off at will, and also turn my device off. But if I turn it off, I don't know how to get it to turn back on. Could I just plug it into a charger and turn it back on, or would I need to plug it into my computer? Please help, in a few days I won't have access to it for 9 weeks, I need immediate help.

    If you power off the iPod, it will turn back on if you connect it to a charger like a wall charger or a computer. I just checked with a charging source to confirm. I knew it did it with a computer.

  • Restore Lock Screen in Windows 8.1

    I deleted the lock screen in Windows 8.1 and now realize I need it.  How can I get it back?  
    I deleted using Windows+R  "regedit"  using this link 
    http://media.askvg.com/downloads/2012/11/Disable-Windows-8-Lock-Screen.zip
    Is there a way to get the lock screen back?

    Hi,
    The registry you posted here are this
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization]
    "NoLockScreen"=dword:00000001
    so you just need to launch regedit editor by run regedit.exe, then locate to the right place, set the value back to 0, then restart your PC.
    or just run the "restore....reg" as David mentioned.
    Yolanda Zhu
    TechNet Community Support

  • HT4623 My apps and my phone freeze up and go back to the locked screen what can I do?

    My apps and my phone freeze up during use and go back to the locked screen. What can I do?

    Hi theora,
    If you haven't already done so, does restarting or resetting the iPhone help the issue?
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If not, we may want to restore your iPhone using a computer with iTunes.
    iTunes: Restoring iOS software
    http://support.apple.com/kb/HT1414
    Thanks,
    Matt M.

  • Lock Screen in Solaris 10

    hello,
    I have installed solaris 10 on intel machine.I can lock the screen if loged in as root,but if I login as non-root there is no option to lock the screen.What should I need to set to lock screen with non root user?
    regards,
    tanveer

    You could try running kdmconfig again and selecting
    an xfree86 driver from the bottom of the list for the
    display card No it doesn't, when the X server used is Xorg (which is the default
    with Solaris 10 b69 x86). Xorg ignores whatever you configure with
    kdmconfig.

  • My lock screen keeps freezing ios 7.1

    Hi guys,
    I want to know if I am alone in this issue or if it is widespread?
    Since updating my iphone 5 to ios 7.1 my lock screen freezes. Not all the time, mainly if there is a notification of a text etc. I have to turn the phone off and on and it sorts it but it shouldn't be happening surely?
    Am I alone in this? My touchscreen was fine until after the update.

    Have you tried restarting the phone or reset all settings?

  • Frozen on lock screen and reboots

    my iphone 3gs is frozen on the lock screen and then reboots over and over again. Any suggestions? I have tried to restore it and it fails

    Try Recovery Mode... http://support.apple.com/kb/HT1808

  • Sleep, Shutdown, Restart, Lock Screen, Volume Control

    After booting, after an undetermined amount of time, I am not able to shutdown the computer, reboot the computer, sleep the computer from the apple menu, or the power button. I am able to sleep the computer by closing the lid. I am not able to control volume from the keyboard keys, but can from the menu bar. I am not able to lock the computer via the menu bar (lock icon->lock screen). I am able to lock the screen using "/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession" -suspend command, however, this seems to lock the screen in a different way that clicking the lock screen button from the menu bar. The computer acts like I just never chose the menu items, or pressed the buttons. Before upgrading I did not have these problems. After the computer has a hard shutdown performed, the functions seem to work for a while, but then randomly stop responding.
    Any advice?
    Thank you.

    It sounds like you have a mess Andy. You could reinstall Sno with an erase and install. Or you could go back to Leo via an erase and install or an archive and install. The erase and install alternatives assume that you have a good backup or that you don't mind reinstalling your apps. You'd have to back up your data, of course. I would repair disk before erasing and installing.
    Archive and install is a good play assuming that you are not ready to do an erase and install and that you want to go back to Leopard. Note that Apple doesn't recommend going backwards this far (i.e., going back beyond a current major version, say, going 10.6.1 back to 10.5.7) via Archive and Install. But, regardless it is a way to get back to Leo and to pave the way for an erase and install of Leo in the future. Note that if you go backwards, then you will not be able to preserve user and network settings--which is a good thing. Fortunately, there is a way to extract anything needed from a prior user home folder. [Here is the explanation|http://support.apple.com/kb/HT2196]. Even though you don't want Sno any more, it would be nice to have a bootable clone of your Sno installation on an external for safety purposes. Also, I would repair disk and permissions before archiving and installing.

  • Windows always shows lock screen when idle, ignores setting

    On Windows 8, I had my computer set up so that the screen would turn off after a period of inactivity. When I would move the mouse or press a key, it would resume without asking me to log in. After upgrading to Windows 8.1, it is now always showing me the
    lock screen when resuming from idle. In the lock screen settings, I found a new option named "When my PC is inactive, show the locks screen instead of turning off the screen". I have disabled this setting, but my computer still locks every time the
    screen turns off.
    How can I get my computer to stop locking when it is idle?

    Hi,
    What about the settings in Screen Saver? Please check the Option "On resume, display logon screen" is unchecked.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Intermittent lock screen PIN input on Yoga 13

    About 1/3 of the time when I swipe the lock screen on the Yoga 13 to enter a PIN, I get a large touch screen PIN pad that pops up to touch the digits, which is the desired outcome.  Why is it that the other 2/3 of the time there is no pop up and I must enter the digits from the keyboard rather than being presented with the touch screen input option?

    Any update on this? I think there is a major bug in their software. I find that if you lock your screen and wake while in laptop mode, the virtual pin pad will automatically appear and stay there until you finish typing your pin. If you lock your screen and attempt to wake while in stand, tent, or tablet moden, the virtual pin pad does not automatically appear. In addition, while in these modes, when you press the input prompt to make the virtual pin/keyboard appear, it only appears for brief moment and then disappears-sometimes even while you are still typing. This is definitely a bug. I bought this laptop yesterday and found this issue within 30 minutes of playing with it at home. I submitted a help ticket yesterday regarding this issue. The tech eventually had me restore to factory conditions. After installing all the latest updates, I cam CONFIRM that this issue STILL persists! This is not me accidentally tapping outside of the pin/keyboard and causing it to minimize. This does it all on its own, and the tech was supposedly able to see this issue when he remotely took over my laptop. I have Yoga 2 2-in-1 11 inch.

  • App running under lock screen with StreamSocket and SpeechSynthesizer

    On wp8 silverlight this was easy. PhoneApplicationService.Current.ApplicationIdleDetectionMode = IdleDetectionMode.Disabled;
    In 8.1 xaml how would I go about this? I have found an ugly hack online that keeps the screen alive, this is not a solution that I can use. My users need to start my app, select a car transponder that they want to hear lap times from, connect to my server
    (over wifi to a local computer running my server code, no internet) hit the lock button, then put their phones in their pockets while they drive and get the lap times on their earpiece. 
    I have the new and more cumbersome text-to-speech working (how you have to have an invisible media element on a the active page for mediaended to fire was especially annoying!). I have the streamsocket stuff working, just not under the lock screen. I don't
    really need it to be a "background task". It is understood and preferable that it disconnects the moment you leave the page where get your live lap times. 
    controlchanneltrigger seemed promising, you can use it for store apps... but not phone.
    To summarize.
    1. connect to server with streamsocket api
    2. lock screen and put phone in pocket
    3. app should stay alive and as packets arrive from the server (one packet every 10 seconds on average), store lap time results and say them out loud using text to speech.
    https://youtu.be/0VnOh6s3hww
    At this point I'm pretty fed up and I'm about to pull the plug on the WP8.1 version, my first experience with xaml was... unpleasant... So if you have some good keywords I can search for that would be appreciated.

    Hi torg,
    The most similar API on Windows Phone 8.1 is
    RequestActive | requestActive method, see this for more information: How to keep the display on during audio/video playback (XAML)
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Voice over does not allow me to open locked screen

    voice over does not allow me to open locked screen iPhone 6
    <Subject Edited by Host>

    Use two taps wherever you would use one tap. Navigate to Settings/General/Accessibility and turn it off.

  • Yoga 8 and 10 - KitKat 4.4.2 - Lock Screen Display

    After upgrading to KitKat 4.4.2, some customers report the lock screen on their Yoga 8 or 10 tablets (B6000-F/H or B8000-F/H) does not display the application currently running when it is tapped to unlock. This is noticable when music is being played and the cover art does not show on the lock screen.
    Please note that Lenovo has escalated internally on this issue. I was personally able to reproduce these reports.
    These reports originated from this thread: http://forums.lenovo.com/t5/Idea-Android-based-Tablets/KitKat-roll-out-for-Yoga-Tablets-starting-Jun...
    My personal thanks to the forums members who provided feedback to help identify post-upgrade symptoms.
    Thank you for your patience,
    Amy Tupper
    Technical Resolution Lead, Pervasive Issues
    Lenovo US
    ThinkPad T431s, S3 Yoga 14, Helix, Edge 11 & 14, E431, IdeaTab A1107, IdeaPad A1-07, IdeaCentre Horizon, Yoga Tablet 2 10 1051
    First computer was a 1980 Commodore 64 from Radio Shack/ GEnie SFRT member from 1993-1996
    Solved!
    Go to Solution.
    Attachments:
    4.4.2 Lock Screen No Cover Art.jpg ‏80 KB

    KitKat OTA V28 was released on January 26th. It should resolve this issue.
    If you are not currently running this update, you can download it by going to Setting - About tablet - System upgrade. Your device will then check to see what updates are available. These updates for the Yoga Tablet 8 and 10 (B6000 and B8000) begin with "A442_001_028"
    Please note that if you have several updates to install, the device may only allow you to install two per day and the installation process may take several days to complete.
    Thank you,
    Amy Tupper
    Technical Resolution Lead, Pervasive Issues
    Lenovo US
    ThinkPad T431s, S3 Yoga 14, Helix, Edge 11 & 14, E431, IdeaTab A1107, IdeaPad A1-07, IdeaCentre Horizon, Yoga Tablet 2 10 1051
    First computer was a 1980 Commodore 64 from Radio Shack/ GEnie SFRT member from 1993-1996

  • Can't send photos taken via lock screen

    When I take a photo using the new quick access from the lock screen (which I LOVE), when I tap on the thumbnail and view the photo, the little button with the icon of the square and the arched arrow, the one I'd tap on to send the photo via email, text, etc., is missing.
    I then have to close the camera app and open Photos, locate the photo and send it from there.
    This doesn't happen if I take a photo the old fashioned way, swiping the lock screen and then opening the camera app. When I do it that way, take a photo, and tap on the thumbnail of the photo I just took to view it, the Share button is there.
    SO annoying and pretty much cancels out all the excitement of being able to access the camera quicker.
    Anyone else experiencing this? Is there anything I can do?
    Thanks!

    It would make sense in your case that you could send.
    But have you also noticed that you cannot see your other camera roll photos in the locked state?
    I can see where you are coming from, and would suggest that you mention it to Apple:
    http://www.apple.com/feedback/iphone.html
    They seldom reply, but it might be addressed.

  • Reject call button does not appear on lock screen.

    On the lock screen when I receive a call only slide to answer, remind me later and reply with a text options appear, there is no button to simply reject the call.

    I have same problem and it drives me crazy.
    You know, since Jobs have passed away, Apple started to do such absurd things, like this precarious pop-up of reject button. Their softwares are starting to get out of control. Look at the screenshot below. Can you believe it? If Jobs were alive, he would never allow this to happen. kekekeke, Apple is definitely going down.

Maybe you are looking for

  • Macbook Air Mirror to Apple TV question

    When I had my iPad I could use airplay to watch streams then put it to sleep, or click home and do something else and it would continue showing the video on my TV. Is there a way to do that with my Macbook Air? I know I can mirror but I want to selec

  • New BlackBerry Desktop Manager software for Mac

    Let me know if there is a better "BlackBerry" forum to ask these questions -- but just wondering if this software will backup Address Book on my Mac to my BlackBerry without erasing everything I've already entered into the Blackberry by hand the past

  • Third Party ADF Application

    Hi, I want to create third party ADF Application from Project server 2010 Database. I have Project Server 2010 as a SQL Server Database. I want to create Timesheet Application in ADF and read and write data to Project server 2010 (SQL Server Database

  • My Canon 5D Mark II AEB is not working.

    My Canon 5D Mark II Auto Exposure Bracketing (AEB) is not working.  I'm shooting M, AV, TV.  Please help!

  • Multithreading in  oracle PLSQL

    Hi I am having 100000 records in my database, Normally i fetch 1000 records from 100000 in bulk and do the process, after completion of first batch the it took second set of 1000 records from 100000 in bulk and do the process. Say in the 1st batch th