Ok, so i used a workaround to fix the issue. I am just resetting the Bezierpath after i change the contentsize of the scrollview:
Following code does the job.
UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, [scroll contentSize].width, [scroll contentSize].height)];
[[scroll layer] setShadowPath:[path CGPath]];