logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • How can we achieve singleton pattern in iOS?


  • Correct Answer
  • The Singleton design pattern ensures a class only has one instance, and provides a global point of access to it The class keeps track of its sole instance and ensures that no other instance can be created Singleton classes are appropriate for situations where it makes sense for a single object to provide access to a global resourceSeveral Cocoa framework classes are singletons They includeNSFileManager, NSWorkspace, NSApplication, and, in UIKit,UIApplication A process is limited to one instance of these classes When a client asks the class for an instance, it gets a shared instance, which is lazily created upon the first request 


  • Technology problems


    Search Results


    • 1. Exception handling is targeted at

    • Options
    • A. Compile time error
    • B. Logical error
    • C. Run time error
    • D. All of the above
    • Discuss
    • 2. Which two method you need to implement for key Object in HashMap ?
    • Discuss
    • 3. What are Spring beans ?
    • Discuss
    • 4. Convert the expression ((A + B) * C ? (D ? E) ^ (F + G)) to equivalent Postfix notations.

    • Options
    • A. AC + B * DE - FG +^-
    • B. AB + C * DE - FG + ^-
    • C. AC + B* DE - FG -+ ^
    • D. AB + C * DE - FG -+ ^
    • Discuss
    • 5. What is Windows Server Backup?
    • Discuss
    • 6. How to declare select-option as a parameter?
    • Discuss
    • 7. Explain the difference between Template and Table ?
    • Discuss
    • 8. How do you put a message in the browser's status bar ?

    • Options
    • A. status("put your message here")
    • B. window.status = "put your message here"
    • C. statusbar = "put your message here"
    • D. window.status("put your message here")
    • Discuss
    • 9. What happens if the list-style-type property is used on a non-list element like a paragraph?
    • Discuss
    • 10. What are Child Selectors ?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment