xcode - How to blur the background when an alert is showing? -


i apply blur effect existing view when alert shown on screen, , doing displaying imageview (blureffect:blurbackgroundsignup) on top of view, hiding , showing when calling following code:

[self blureffect:blurbackgroundsignup]; 

the blureffect method works blurred view when put code in viewdidload method, when check alert or add code displaying alert refuses show. guessing there needs overridden , not know how this.

in short, there's nothing in uialertview prevent image view blurred image showing up. it's simple.

you have diagnostics identify source of problem. problem snapshot itself. pause execution @ point snapshot created, hover on uiimage variable holds blurred snapshot, click on "quick look" button (looks eye; enter image description here), , confirm blurred image looks correct:

enter image description here

the next thing check make sure image added image view , image view added view hierarchy. can continue execution of app , hit view debug button enter image description here:

enter image description here

or can run app, hit "pause" button, , @ (lldb) prompt enter po [[uiwindow keywindow] recursivedescription]. (you may want temporarily pause show of alert view can focus on other views in view hierarchy). anyway, should see like:

(lldb) po [[uiwindow keywindow] recursivedescription] <uiwindow: 0x7fb45e3247a0; frame = (0 0; 375 667); gesturerecognizers = <nsarray: 0x7fb45e3324c0>; layer = <uiwindowlayer: 0x7fb45e337db0>>    | <uiview: 0x7fb45bc36520; frame = (0 0; 375 667); autoresize = w+h; layer = <calayer: 0x7fb45bc362c0>>    |    | <uibutton: 0x7fb45bc2f0c0; frame = (313 28; 46 30); opaque = no; autoresize = rm+bm; layer = <calayer: 0x7fb45bc2f660>>    |    |    | <uibuttonlabel: 0x7fb45bc44cb0; frame = (0 6; 46 18); text = 'button'; opaque = no; userinteractionenabled = no; layer = <_uilabellayer: 0x7fb45bc44c50>>    |    | <uilabel: 0x7fb45bc36870; frame = (16 66; 343 581); text = 'lorem ipsum dolor sit ame...'; opaque = no; autoresize = rm+bm; userinteractionenabled = no; layer = <_uilabellayer: 0x7fb45bc36d40>>    |    | <_uilayoutguide: 0x7fb45bc38b30; frame = (0 0; 0 20); hidden = yes; layer = <calayer: 0x7fb45bc32a40>>    |    | <_uilayoutguide: 0x7fb45bc39780; frame = (0 667; 0 0); hidden = yes; layer = <calayer: 0x7fb45bc398b0>>    |    | <uiimageview: 0x7fb45bf760e0; frame = (0 0; 375 667); opaque = no; userinteractionenabled = no; tag = 42; layer = <calayer: 0x7fb45bf77db0>> 

note, you'll notice in first screen snapshot, temporarily added tag number blurredimageview. reason makes easier find view in question in view hierarchy shown above (it's last line, 1 included tag = 42). anyway, confirm image view containing blurred image in view hierarchy, reasonable frame , not hidden behind anything.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -