MBProgressHUD setProgress in iOS 17

836 Views Asked by At

I'm using an older pod, the MBProgressHUD, that is returning an error when trying to run on iOS 17.0:

Multiple methods named 'setProgress:' found with mismatched result, parameter type or attributes. 

It's fairly deeply integrated into the app so I would like to edit it as little as possible. Any idea on the best solution? I've seen options to type-cast id, but I'm a bit unsure about what to cast it to?

Screenshoot on the MBProgressHUD error

2

There are 2 best solutions below

0
Anden87 On

Type-casting it to UIProgressView seemed to do the trick, i.e. from

[(id)indicator setProgress:progress];

to

[(UIProgressView*)indicator setProgress:progress];
0
S.lahiru On

Change

[(id)indicator setProgress:progress];

to

[[indicator class] instanceMethodSignatureForSelector:@selector(setProgress:)];