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

  • Home
  • SEARCH
  • 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 8916271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:11:51+00:00 2026-06-15T05:11:51+00:00

I have a button on the view of iPhone built on mono touch. When

  • 0

I have a button on the view of iPhone built on mono touch.
When it is clicked, it fires an animation and then returns to the main animation.
Both animations are fired on an UIImageView which is on the same view where the button exists.

But it disappears when I click after two times?
I want the button always on the surface.

partial void TurnLightOnOrOff (MonoTouch.Foundation.NSObject sender)
        {
            TAMAM.coreLife.SwitchLightsStatus ();
            dayPartType = DayPart.CurrentDayPart ();
            if (dayPartType != DayPart.DayPartType.Night) {
                playMainAnim ();
                return;
            }
            var sound = SystemSound.FromFile (@"sound/Click.caf");
            sound.PlaySystemSound ();

            if (!TAMAM.coreLife.LightsOn) {

                myImages = new List<UIImage> ();
                myImages.Add (UIImage.FromFile (@"image/babysleep/babysleeplightoff10000.png"));
                myImages.Add (UIImage.FromFile (@"image/babysleep/babysleeplightoff20000.png"));
                myImages.Add (UIImage.FromFile (@"image/babysleep/babysleeplightoff30000.png"));
            var myAnimatedView = new UIImageView (this.animFrameRectangle);
                myAnimatedView.AnimationImages = myImages.ToArray ();
                myAnimatedView.AnimationDuration = 1; // Seconds
                myAnimatedView.AnimationRepeatCount = 0; // 0 = Loops Forever
                myAnimatedView.StartAnimating ();
                if (this.svBabyAge.Subviews.Length > 0) {
                    this.svBabyAge.Subviews [0].RemoveFromSuperview ();
                }
                if(this.ivBabyAge.Subviews.Length > 0)
                {
                    this.ivBabyAge.Subviews [0].RemoveFromSuperview ();
                }
                this.ivBabyAge.AddSubview (myAnimatedView);
                this.svBabyAge.AddSubview (this.ivBabyAge); 

            } else {
                playMainAnim ();
            }

        }

{

    [Register ("babyAge")]
    partial class babyAge
    {
        [Outlet]
        MonoTouch.UIKit.UIView svBabyAge { get; set; }

        [Outlet]
        MonoTouch.UIKit.UIImageView ivBabyAge { get; set; }

        [Outlet]
        MonoTouch.UIKit.UIButton butonInformation { get; set; }

        [Action ("ShowInformationAboutTamagotchiStatus:")]
        partial void ShowInformationAboutTamagotchiStatus (MonoTouch.Foundation.NSObject sender);

        [Action ("FeedBaby:")]
        partial void FeedBaby (MonoTouch.Foundation.NSObject sender);

        [Action ("PlayWithBaby:")]
        partial void PlayWithBaby (MonoTouch.Foundation.NSObject sender);

        [Action ("TurnLightOnOrOff:")]
        partial void TurnLightOnOrOff (MonoTouch.Foundation.NSObject sender);

        [Action ("Dance:")]
        partial void Dance (MonoTouch.Foundation.NSObject sender);

        [Action ("DoctorRepairBaby:")]
        partial void DoctorRepairBaby (MonoTouch.Foundation.NSObject sender);

        [Action ("DoWc:")]
        partial void DoWc (MonoTouch.Foundation.NSObject sender);

        void ReleaseDesignerOutlets ()
        {
            if (svBabyAge != null) {
                svBabyAge.Dispose ();
                svBabyAge = null;
            }

            if (ivBabyAge != null) {
                ivBabyAge.Dispose ();
                ivBabyAge = null;
            }

            if (butonInformation != null) {
                butonInformation.Dispose ();
                butonInformation = null;
            }
        }
    }
}
  • 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-15T05:11:53+00:00Added an answer on June 15, 2026 at 5:11 am

    That was my fault that I confess now:
    It was because I remove subviews’ element . My purpose was controlling the unnecessary elements to be removed but the buttons was removed in that loop.

    Thanks for your time.

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

Sidebar

Related Questions

I am new to iphone development. I have created a button in the view.
At the moment, I have a settings view in my iPhone app built with
I have create an iPhone application. I have a button in a view. In
I have an iphone application containing two views The first view have a button,
I am implementing UIScroller View into my iPhone App. I have around 50 button
I have a button in a view which refuses to work. I've got in
I have a button created in my view. In the ViewModel, I wish to
We have place a button on a view. When we press it, nothing happens.
I have a view with which I have a button calling the following method.
I have a an object view with data and a button on that view.

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.