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 6973181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:04:30+00:00 2026-05-27T17:04:30+00:00

I am getting an error Implicit conversion of an Objective-C pointer to ‘void’ is

  • 0

I am getting an error Implicit conversion of an Objective-C pointer to ‘void’ is disallowed with ARC

-(void)openAnimation {

     NSValue *contextPoint =[NSValue valueWithCGPoint:self.view.center];

    [UIView beginAnimation:nil context:contextPoint]; // getting error here
}

Can anyone help me to solve this error

Thank you

  • 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-05-27T17:04:31+00:00Added an answer on May 27, 2026 at 5:04 pm

    So first, I would point out that this type of thing is easier to do with the block based animation methods. For iOS4 and iOS5, Apple recommends that you use those newer methods instead.

    But to answer your specific question, the context parameter is a void *. ARC doesn’t (can’t) maintain any management of void * pointers, so when you pass your ‘contextPoint’ (which is an NSValue *) to this method, ARC is effectively losing track of it.

    The compiler will allow this with a bridge cast. But you also have to make sure that your ‘contextPoint’ survives beyond this method, so the specific cast you need is __bridge_retained, which is a cast with a +1 net retain count:

    [UIView beginAnimation:nil context:(__bridge_retained void *)contextPoint];
    

    That solves the immediate problem, expect that you will now be leaking that contextPoint. So in your animationDidStart:context: or animationDidStop:finished:context: (wherever you intended to use this contextPoint) you need to balance that +1 count with something like this:

    NSValue *contextPoint = (__bridge_transfer NSValue *)context;
    

    This bridges that object back under ARC’s control and the __bridge_transfer tells ARC to release that object to balance the __bridge_retained from earlier.

    Again, use the block based methods instead, and let ARC and blocks take care of these things for you. They already know how to correctly capture and retain objects that you need in your animation or completion blocks.

    I hope that makes sense.

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

Sidebar

Related Questions

I am working with Objective-C and am getting the error Overflow in implicit constant
I am getting this error while developing a stored procedure Implicit conversion of varchar
I get this error: ActionView::Template::Error (no implicit conversion to float from nil): Around this
I'm getting this error: warning: incompatible implicit declaration of built-in function ‘malloc’ I am
I am getting the following error in MySQL: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and
I am pretty new to C. I am getting this error: incompatible implicit declaration
getting error while try to start service
I am getting error trying to run my asp code for executing stored proc.
I'm getting error: Unrecognised selector sent to instance, upon inspection, I see there is
I wrote following code...but i am getting Error like: Error 1 'LoginDLL.Class1.Login(string, string, string)':

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.