Note that there are some explanatory texts on larger screens.

plurals
  1. POCalling method from principal class in objective-C
    primarykey
    data
    text
    <p>I'm did functionality of timer out if User can't touch on screen for 10 minutes then my application directly goes on login screen. For above problem i use sample code from here <a href="https://github.com/B-Sides/ELCUIApplication" rel="nofollow noreferrer">https://github.com/B-Sides/ELCUIApplication</a> doing some changes in naming of class so my class is <code>PB_TIMER_UIApplication</code> instead of <code>ELCUIApplication</code>. I calling <code>PB_TIMER_UIApplication</code> class in main.m class it implementation as following,</p> <pre><code>return UIApplicationMain(argc, argv, NSStringFromClass([PB_TIMER_UIApplication class]), NSStringFromClass([AppDelegate class])); </code></pre> <p>I set principalClassName as a <code>PB_TIMER_UIApplication</code></p> <p>Now i create one property and instance method in <code>PB_TIMER_UIApplication</code> like following,</p> <pre><code>@interface PB_TIMER_UIApplication : UIApplication{ NSTimer *_idleTimer; } @property(nonatomic) int timerTimeOutIntervals; - (void)resetIdleTimer; </code></pre> <p>Now i want my application show alert before going login screen/timeout session. If alert button press OK then my timer again start for 10 second. That why i create an property for <code>timerTimeOutIntervals</code> and that property and <code>resetIdleTimer</code> instance method i want to call in throughout application. So i trying to access property/method as like Appdelegate call, <code>[[PB_TIMER_UIApplication sharedApplication] setTimerTimeOutIntervals:10];</code> but it show me static error ,</p> <p><img src="https://i.stack.imgur.com/9HqGC.png" alt="enter image description here"></p> <p>My question where i'm wrong and what to do for calling property of instance method from principle class?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload