關于函數(shù)傳參個數(shù)的問題
在strokeRoundRect函數(shù)中有兩個可選參數(shù)lineWidth和strokeColor,那如果我不設置lineWidth,要設置strokeColor,那它怎么知道我傳進去的那個參數(shù)是strokeColor而不是lineWidth呢,因為并沒有占位符啊
在strokeRoundRect函數(shù)中有兩個可選參數(shù)lineWidth和strokeColor,那如果我不設置lineWidth,要設置strokeColor,那它怎么知道我傳進去的那個參數(shù)是strokeColor而不是lineWidth呢,因為并沒有占位符啊
2016-05-17
舉報
2016-05-24
lineWidth是數(shù)字
顏色是字符串