Questions tagged [weak]
128 questions
0
votes
1 answer
ER diagram for an association with 3 Entities
Can I have a weak relationship with 3 entities, two of them weak and one strong?
Cause I know you can't put a weak relationship with 2 weak entities, but I'm hoping the third party being strong changes that

Sofia Martins
- 1
- 1
0
votes
2 answers
why delegates should be unsafe_unretained and not weak?
I added ARC to an app I'm working on. Unfortunately, it crashes. I found that the automatic script which updates all apps to ARC gave __unsafe_unretained qualifier to all id< protocolName> type.
Why isn't it a weak type? I have deployed the app and…

yonivav
- 994
- 11
- 18
0
votes
1 answer
What is the weak entity in this ER diagram
https://i.stack.imgur.com/3wdI0.png
Please refer to the link above. Is 'billing_info' a weak entity as it depends completely on 'orders'?
And if so, is 'bill_id' discriminator?

user2828552
- 67
- 1
- 2
- 10
0
votes
1 answer
ObjC automatic reference counting(ARC): weak vs assign vs unsafe_unretained for delegate?
I have a class:
@interface MyClass : NSObject
@property (weak) id delegate;
@end
and the implementation:
@implementation MyClass
@synthesize delegate;
@end
When I refactor the code for ARC, it tells me that synthesize of 'weak' property is only…

hzxu
- 5,753
- 11
- 60
- 95
-1
votes
1 answer
Nil while unwrapping an Optional value Error
fatal error: unexpectedly found nil while unwrapping an Optional value
With following Code:
weak var previewBlurView : UIVisualEffectView?
func blurPreviewWindow() {
if (self.previewBlurView == nil) {
var blurEffect: UIVisualEffect
…

Gizmodo
- 3,151
- 7
- 45
- 92
-1
votes
1 answer
assign in NON-ARC and retain cycle
How retain cycle was tackled in NON-ARC !
I know assign is an alternative to weak.
weak will have its value set to nil If object allocated is deallocated whereas assign is not
so how it was done earlier can anybody help me understand

vinoth.kumar
- 92
- 12
-1
votes
1 answer
Typecasting in IOS from CustomObject to id
What happens if we typecast a custom object to id,
i had a problem of assigning to id from incompatible type Myclass* __Strong
working code:
self.delegate=(id)mycustomobject;
then i type casted my object to id and it was all fine and worked as a…

Ajay Babu Singineedi
- 185
- 1
- 1
- 13
-1
votes
2 answers
How to restart the big loop (inside it 2 others small loops)
So i have this program and it works (mathematically) even though the user can use it without problem. The only matter is, in the end when the program asks the user to quit or to restart it dosen't !
So how can i restart the game !!!
Thank you all…

Ali Assafiri
- 3
- 5