ios - Border for Cut-In circular Hole Swift -


enter image description herei want add border cut in hole (clear in middle , translucent outside). using partialtransparentmaskview this.

https://github.com/heigong/partialtransparentmaskview 

the code looks this

  mapview.clipstobounds = false      let frame = mapview.frame      // add mask view     var array = [cgrect]()     //to change circle customize next line     let rect = cgrectmake(frame.origin.x+20,100, frame.width-40, frame.height-300)      array.append(rect)      let maskcolor = uicolor(red: 0.9, green: 0.5, blue: 0.9, alpha: 0.5)     let parentview = mapview.superview     let pframe = parentview!.frame     let maskview = partialtransparentmaskview(frame: cgrectmake(0, 0, pframe.width, pframe.height), backgroundcolor: maskcolor, transparentrects: nil, transparentcircles:array, targetview: mapview)     parentview!.insertsubview(maskview, abovesubview: mapview) 

how can add red boundary around circle?

maskview view. isn't mask; it's view transparency drawn it. draw red boundary view, draw view.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -