Closed urmyfaith closed 9 years ago
I cannot read Chinese, however, it appears you have having an issue compiling where the compiler tells you that you have multiple defined symbols of the same type?
Make sure you are using the latest version, as currently MMProgressHUD.m:34
does not contain what you described above.
It looks like, depending on your compiler flags, you could have an issue compiling with the error you described due to a type error in the method declaration in MMProgressHUDPrivate.h:104
:
MMProgressHUDPrivate.h:104
:
- (void)dismissWithCompletionState:(MMProgressHUDCompletionState)completionState
title:(NSString *)title
status:(NSString *)status
afterDelay:(float)delay;
change to:
- (void)dismissWithCompletionState:(MMProgressHUDCompletionState)completionState
title:(NSString *)title
status:(NSString *)status
afterDelay:(CGFloat)delay;
Let me know if this helps.
I just pushed up commit 32bdc42 that has this change.
I am very sorry to use Chinese to post this issue.
At the same time, I am very glad that you have graped what I am taking about.
Come to this issue, I have found that's a problem about 32 bit simulator or 64 bit simulator,
when the project's target is iPhone Retina(3.5-inch)
or iPhone Retina(4-inch)
, there is no problem when compiling.
But,when choosing
iPhone Retina(4-inch-64bit)
(under Xcode 5.1.1) oriPhone 6
(under Xcode 6+),the compiler will rase this redefine error.
I just downlaod your git project and poll your "Source" directory into my project.
where are your MMProgressHUDPrivate.h:104:
file? I could not find that file in this repository.
Instead of using the the code blow:
- (void)dismissWithCompletionState:(MMProgressHUDCompletionState)completionState
title:(NSString *)title
status:(NSString *)status
afterDelay:(float)delay;
here is what my code is:
[MMProgressHUD setPresentationStyle:MMProgressHUDPresentationStyleFade];
[MMProgressHUD showProgressWithStyle:MMProgressHUDProgressStyleIndeterminate title:nil
status:@"loading"];
[manager GET:path parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
[self analyJSON:responseObject];
[MMProgressHUD dismissWithSuccess:@"load complet"];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
[MMProgressHUD dismissWithError:nil title:@"load failed."];
}];
Thanks for your reply.
Sorry for using Chinese again.
I tried reproducing what you've given me and I'm having a hard time getting the compiler to give me the same error you have shown above. In fact, the constant at MMProgressHUD.m:35
that the error is supposed to be pointing to is not on line 35, but on line 37, which tells me you are using an oudated commit of the codebase.
Secondly, the enum MMProgressHUDProgressStyle
and the corresponding API methods that accept that enum have been deprecated in the latest version of the code.
出现重定义是怎么回事?
但是在工程中总共只有四处用到这个变量
报错: