ChrisXu / CXAlertView

Custom alert-view which allow you to add view as main content.
MIT License
323 stars 81 forks source link

LiveFrost dependency #3

Closed danielebogo closed 10 years ago

danielebogo commented 10 years ago

hi, it's a problem with the podspec of this library. It doesn't contain the LiveFrost dependency.

rcdilorenzo commented 10 years ago

I actually have a fork that I'll be opening a pull-request soon on that should fix this issue along with some other things I'm working on.

danielebogo commented 10 years ago

Hi @rcdilorenzo , your walkaround seems ok. Well done! Can you fix the warning for messageLabel.lineBreakMode? Now the lineBreakMode is set with UILineBreakModeTailTruncation, but is deprecated in ios > 5. Below you can find a simple fix.

if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000

messageLabel.lineBreakMode = NSLineBreakByTruncatingTail;

else

messageLabel.lineBreakMode = UILineBreakModeTailTruncation;

endif

rcdilorenzo commented 10 years ago

Yep… I'll add that. Thanks!

ChrisXu commented 10 years ago

@danielebogo Sorry. I fixed it and I sent an new version to cocoa pods (v1.0.1).

@rcdilorenzo Thank you for your participation:)

if there are any bugs, please let me know.

danielebogo commented 10 years ago

Hi @ChrisXu1221, there is only a warning that i described yesterday to @rcdilorenzo . You can read this below: Now the lineBreakMode is set with UILineBreakModeTailTruncation, but is deprecated in ios > 5. Below you can find a simple fix.

if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000

messageLabel.lineBreakMode = NSLineBreakByTruncatingTail;

else

messageLabel.lineBreakMode = UILineBreakModeTailTruncation;

endif

ChrisXu commented 10 years ago

I do add below code to have a runtime check.

if ([[[UIDevice currentDevice] systemVersion] floatValue] > 6.0) {
   messageLabel.lineBreakMode = NSLineBreakByTruncatingTail;
}
else {
// deprecated in 6.0
  messageLabel.lineBreakMode = UILineBreakModeTailTruncation;
}
danielebogo commented 10 years ago

Xcode 5 evidences the same warning. Do you think the preprocessor macro is better? So Xcode doesn't compile the line if the ios is >= 6. What do you think?

ChrisXu commented 10 years ago

OK, done. Thanks!