Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8783803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:55:13+00:00 2026-06-13T20:55:13+00:00

In my iOS application, when the user pushes a button in a view, a

  • 0

In my iOS application, when the user pushes a button in a view, a NSTimer is trigered in the controller.
On the third tick, I would like to make the background of the view bliking.

I’ve written the blinking function in the view (it should’t be written in the controller, should it ?)

I can trigger this blinking function in the controller by

LostView *lostView = (LostView* ) self.view;
[lostView blinkBackground];

But it’s bad, isn’t it ? The controller shoudn’t know the view neither the name of the function ?
I would like to apply the MVC pattern

Is the observer/obervable pattern applicable in this situation ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:55:15+00:00Added an answer on June 13, 2026 at 8:55 pm

    No it’s not bad at all. It looks like you implemented the method to make the view blink in the view itself. That’s fine, because it’s directly related to the visual representation (i.e. the view part of MVC). You could reuse that view in any other app that requires a blinking view.

    Since that blinking is triggered by an NSTimer I assume that it’s somehow dependent on the logic in this specific app. The view can’t (shouldn’t) know when it’s supposed to blink (that would only be the case if that blinking was a direct reaction of an interaction with it or another related part of the UI – or it was part of a more complex element, for example a countdown timer that always starts to blink when it reaches the last 10 secs or so. For example the UIButton provides the possibility to highlight it self if it’s touched.)

    But if that blinking is a reaction of some state transition in your app, maybe some new data becomes available or a countdown is about to expire, the controller is a perfectly reasonable place to trigger that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to share somethin from my iOS application to user's Facebook wall.
In our iOS application with three UIViewController s one after another, we would like
I have a MKMapView in my iOS application, and would like to add the
I have an iOS application that uses GPS for Location Services. A user would
Assuming this is possible, I would like my iOS application, when backgrounded, to poll
i have an iOS application witch uses the current location of the user. I
In my iOS application, I'm showing date picker through which user can select at
I'm working on an application for iOS which will have the user fill out
In my iOS application, I'm using custom NavigationItem (added to root view from Nib
I am currently building an iOS application with flash CS5 and I would need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.