chrismiles / CMPopTipView

Custom UIView for iOS that pops up an animated "bubble" pointing at a button or other view. Useful for popup tips.
https://github.com/chrismiles/CMPopTipView
MIT License
2.73k stars 467 forks source link

doesn't compile with C++11 #100

Open mvitolo opened 9 years ago

mvitolo commented 9 years ago

With a project with C++11 enabled the compiler give me error: non-constant-expression cannot be narrowed from type 'double' to 'CGFloat' (aka 'float') in initializer list

line 151

CGFloat locationList[] = {0.0, bubbleMiddle-0.03, bubbleMiddle, bubbleMiddle+0.03, 1.0};

line 176

 CGFloat colorList[] = {
            //red, green, blue, alpha 
            red*1.16+colourHL, green*1.16+colourHL, blue*1.16+colourHL, alpha,
            red*1.16+colourHL, green*1.16+colourHL, blue*1.16+colourHL, alpha,
            red*1.08+colourHL, green*1.08+colourHL, blue*1.08+colourHL, alpha,
            red     +colourHL, green     +colourHL, blue     +colourHL, alpha,
            red     +colourHL, green     +colourHL, blue     +colourHL, alpha
        };